Linux x86 shellcode which does a write(stdout,"bob from DSR", 15); exit;.
04c216d2661400f510d03ed170a51474fea2bbbd044a369889d0cc9dbb7ae928
/*
* Linux x86 shellcode by bob from Dtors.net.
* write(stdout,"bob from DSR", 15); exit;
*/
#include <stdio.h>
char shellcode[]=
"\x31\xc0\x31\xdb\x31\xd2\x53\x68\x20\x44\x53\x52"
"\x68\x66\x72\x6f\x6d\x68\x62\x6f\x62\x20\x89\xe1"
"\xb2\x0f\xb0\x04\xcd\x80\x31\xc0\xb0\x01\xcd\x80";
int
main()
{
void (*dsr) ();
(long) dsr = &shellcode;
printf("Size: %d bytes.\n", sizeof(shellcode));
dsr();
}