/*
 * Linux x86 shellcode by bob from Dtors.net.
 * write(stdout,"bob from DSR", 15); exit;
 */



#include <stdio.h>

char shellcode[]=
		"\x31\xc0\x31\xdb\x31\xd2\x53\x68\x20\x44\x53\x52"
		"\x68\x66\x72\x6f\x6d\x68\x62\x6f\x62\x20\x89\xe1"
		"\xb2\x0f\xb0\x04\xcd\x80\x31\xc0\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    #push 0 byte to eax
        xor    %ebx,%ebx    #push 0 byte to ebx
        xor    %edx,%edx    #push 0 byte to edx
        push   %ebx         #push ebx on the stack
        pushl $0x6e5c6873
	  pushl $0x2f6e6962
	  pushl $0x2f3a2f3a
	  pushl $0x626f623a
	  pushl $0x303a303a
	  pushl $0x3a626f62
        mov    %esp,%ecx    #mov contents of esp into ecx
        mov    $0x0f,%dl    #reserve 15 bytes for arg
        mov    $0x4,%al     #syscall for write
        int    $0x80        #execute the syscall
        xor    %eax,%eax

        // exit;
        mov    $0x1,%al     #syscall for exit
        int    $0x80        #execute the syscall
");
}
*/
