fork(3) download
  1. #include <stdio.h>
  2.  
  3. const char sh[] = "\xb8\x04\x00\x00\x00\xbb\x01\x00"\
  4. "\x00\x00\x68\x75\x69\x21\x00\x68"\
  5. "\x20\x2d\x20\x68\x68\x4f\x50\x00"\
  6. "\x00\x89\xe1\xba\x0a\x00\x00\x00"\
  7. "\xcd\x80\xb8\x01\x00\x00\x00\xbb"\
  8. "\x00\x00\x00\x00\xcd\x80\xc3";
  9.  
  10.  
  11.  
  12. int main(){
  13. int (*func)();
  14. func = (int (*)()) sh;
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:14:26: error: expected '}' at end of input
     func = (int (*)()) sh;
                          ^
stdout
Standard output is empty