Linux/Ubuntu: sniff tcp communications (binary output)


Sun Aug 28 2022 22:16:57 GMT+0000 (Coordinated Universal Time)

Saved by @marcopinero #bash

$ sudo apt-get install tcpflow
$ sudo tcpflow -p -c -i <netinterface> port <portnum>

# Example: tcpflow -p -c -i eth0 port 80

TCPFlow tool help me to sniff tcp communication on any port (source or target). It could be combined with "grep" to filter text while running. <netinterface> is the network interface's name, it could by "any" or name like "eth0", "wlan1" etc. <portnum> is the port number to be tracked (it does not matter if is source or target port).