Skip to content

Instantly share code, notes, and snippets.

@tsongas
Created March 2, 2015 18:21
Show Gist options
  • Save tsongas/a390b2a8cb4d8ac2857c to your computer and use it in GitHub Desktop.
Save tsongas/a390b2a8cb4d8ac2857c to your computer and use it in GitHub Desktop.
SSJS Vulnerability
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
if (req.method === 'GET') {
res.end('Waiting for data....');
}
if (req.method === 'POST') {
res.write('Receiving data....');
var data = '';
req.addListener('data', function(chunk) {
data += chunk;
});
req.addListener('end', function() {
myData = eval("(" + data + ")");
res.end(myData + '\n');
});
}
}).listen(80);
console.log('Server listening on port 80');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment