Created
March 2, 2015 18:21
-
-
Save tsongas/a390b2a8cb4d8ac2857c to your computer and use it in GitHub Desktop.
SSJS Vulnerability
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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