TCP Spy
TCP Spy is a simple node.js library to intercept raw TCP connections. I use it to reverse engineer TCP protocols ;-)
Install
You can install tcpspy using the Node Package Manager (npm):
npm install tcpspy
Simple example
var tcpspy = ; var httpProxy = 9000 "google.com" 80 "HTTP Proxy";httpProxy;httpProxy;httpProxystart; console;
Simple example using an object as parameters
var tcpspy = ; var httpProxy = sourcePort: 9000 destinationIP: "google.com" destinationPort: 80 debugIdentifier: "HTTP Proxy";httpProxy;httpProxy;httpProxystart; console;
Note: if you leave out the debugIdentifier
, no debugging info will be displayed.
Fancy example with colors
var tcpspy = ; var colors = ; if!colors console; console;console; var httpProxy = 9000 "google.com" 80 "HTTP Proxy";httpProxy;httpProxy;httpProxystart; console;