开发者

Socket Listener (on Linux)

I'm searching for a way to listen to a specific port on a specific ip and just dump all incoming data.

It has to work on linux, perferrably something that comes as debian package but if i have to compile it thats fine to.

Would be nice开发者_运维百科 if the data gets stored in a mysql database, but just a file would be ok to.

Thanks!


use command

 nc -l hostname 10000  > op.txt


netcat, often packaged as nc, is a great tool for such tasks.


You can always use Nmap (more advanced).

It is an utility for network exploration or security auditing...

Link: http://nmap.org/


Another tool you can use is ngrep / very similar to tcpdump but you can tell it to only listen for packets containing a certain string. You can specify a port and source and destination IP as well


Yet another tool is tcpdump and its descendants:

sudo tshark -w /tmp/out.pcap -s 2000 -i eth0 ip host 198.51.100.99 and tcp port 80


Thanks for all your suggestions but i had to go another way...

There is a Debian Package called 'ucspi-tcp' which contains 'tcpserver'

tcpserver just listens on a port and pipes everything into a process you specify. In my case i wrote a little script that stores the data in a mysql Database.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜