Skip to content

Instantly share code, notes, and snippets.

@ericjang
Created May 8, 2012 09:04
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 ericjang/2633760 to your computer and use it in GitHub Desktop.
Save ericjang/2633760 to your computer and use it in GitHub Desktop.
IP address and stream data logging in NodeJS using the Net module
//note that this is just basic IP address routing. XSS exploit needed for more accurate location.
var http = require('http');
var server = http.createServer(function(req,res){
res.writeHead(200);
res.end('Hello HTTP');
console.log('client connected! ip address is ' + req.socket.remoteAddress);
});
server.listen(8080);
console.log('server listening at localhost:8080. Send your victim over!');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment