The Bytecode Club - Reverse Engineering Forum
Advanced Hello World Program - Printable Version

+- The Bytecode Club - Reverse Engineering Forum (https://the.bytecode.club)
+-- Forum: Lobby (https://the.bytecode.club/forumdisplay.php?fid=1)
+--- Forum: Programming (https://the.bytecode.club/forumdisplay.php?fid=86)
+--- Thread: Advanced Hello World Program (/showthread.php?tid=120)



Advanced Hello World Program - Null - 10-25-2014

Code:
import java.lang.annotation.SafeVarargs;

class AdvHWP<T> implements Serializable {
      
     private transient volatile boolean running;

     @SafeVarargs
     public static void main(final String... args){
            new Thread(){
                 public synchronized void run(){
                        this.running = true;
                 }
            }.start();
            if(T instanceof String) {
                final List<T> list = Collections.unmodifiableList(Arrays.asList("Hello World!"));
                System.out.print(list.get((byte) 0));
            } else {
                 running = false;
                 return;
            }
            System.exit((byte) 0);
     }

}

Best Hello World program that anyone could ever skid. And now, it's here, on The Bytecode Club.


RE: Advanced Hello World Program - zooty - 10-25-2014

lightweight
>not writing your hello world in shellcode

Code:
char code[] =

    "\xe9\x1e\x00\x00\x00"  //          jmp    8048083 <MESSAGE>
    "\xb8\x04\x00\x00\x00"  //          mov    $0x4,%eax
    "\xbb\x01\x00\x00\x00"  //          mov    $0x1,%ebx
    "\x59"                  //          pop    %ecx
    "\xba\x0f\x00\x00\x00"  //          mov    $0xf,%edx
    "\xcd\x80"              //          int    $0x80
    "\xb8\x01\x00\x00\x00"  //          mov    $0x1,%eax
    "\xbb\x00\x00\x00\x00"  //          mov    $0x0,%ebx
    "\xcd\x80"              //          int    $0x80
    "\xe8\xdd\xff\xff\xff"  //          call   8048065 <GOBACK>
    "Hello wolrd!\r\n";     // OR       "\x48\x65\x6c\x6c\x6f\x2c\x20\x57"
                            //          "\x6f\x72\x6c\x64\x21\x0d\x0a"


int main(int argc, char **argv)
{
    (*(void(*)())code)();

    return 0;
}



RE: Advanced Hello World Program - Bibl - 10-25-2014

(10-25-2014, 05:46 AM)zooty Wrote:  lightweight
>not writing your hello world in shellcode


Code:
char code[] =

   "\xe9\x1e\x00\x00\x00"  //          jmp    8048083 <MESSAGE>
   "\xb8\x04\x00\x00\x00"  //          mov    $0x4,%eax
   "\xbb\x01\x00\x00\x00"  //          mov    $0x1,%ebx
   "\x59"                  //          pop    %ecx
   "\xba\x0f\x00\x00\x00"  //          mov    $0xf,%edx
   "\xcd\x80"              //          int    $0x80
   "\xb8\x01\x00\x00\x00"  //          mov    $0x1,%eax
   "\xbb\x00\x00\x00\x00"  //          mov    $0x0,%ebx
   "\xcd\x80"              //          int    $0x80
   "\xe8\xdd\xff\xff\xff"  //          call   8048065 <GOBACK>
   "Hello wolrd!\r\n";     // OR       "\x48\x65\x6c\x6c\x6f\x2c\x20\x57"
                           //          "\x6f\x72\x6c\x64\x21\x0d\x0a"


int main(int argc, char **argv)
{
   (*(void(*)())code)();

   return 0;
}

you shud get the ctrl + c & ctrl + p award of the month zoty queer fuck