Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (13 sloc) 361 Bytes
// Paste shellcode into the code[] array in \x90\x90\x90\x90 format
// Compile with:
// gcc -z execstack -fno-stack-protector shellcode_wrapper.c -o shellcode
#include<stdio.h>
#include<string.h>
unsigned char code[] = \
"\x90\x90\x90\x90";
main()
{
printf("Shellcode Length: %d\n", (int)strlen(code));
int (*ret)() = (int(*)())code;
ret();
}