Thursday, November 10, 2016

Using netcat to view TCP/IP traffic (traffic proxy viewer)

If I wanto to view traffic  from my app in HostA going to HostB and from HostB to HostA.



I connect them with a netcat/tee in the middle.



mkfifo backpipe or mknod backpipe p



Term 1(HostA):

nc -k -l 8090 <backpipe | tee -a in.dump | nc HostB 80 | tee -a out.dump >backpipe


Term2(HostA):

tail -f in.dump


Term2(HostA):

tail -f out.dump

Then I connect myApp to netcat  in localhost, port 8090

Referência:

http://pankaj-k.net/weblog/2010/05/using_netcat_to_view_tcpip_tra.html

No comments:

Blog Archive