Originally Posted by
manasij7479
> (well it might, if you list actual opcodes in the array)
Seems like a good thing to try out.
What would be the numbers for putting 1 into eax , 0 in ebx and invoking the kernel for exit be ?
It wouldn't work. Such an object would be data, and would be placed in the data segment, which is non-executable. It would crash the moment it jumped to it.
EDIT: But if you do want to try it, you can use:
Code:
unsigned char main[] = { 0xBB, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x00, 0xCD, 0x80 };