Florian F
Florian F

Reputation: 4343

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!

Upvotes: 1

Views: 3279

Answers (6)

Florian F
Florian F

Reputation: 4343

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.

Upvotes: 0

Robᵩ
Robᵩ

Reputation: 168616

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

Upvotes: 0

user623666
user623666

Reputation: 1

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

Upvotes: 0

Daniel Santos
Daniel Santos

Reputation: 1

You can always use Nmap (more advanced).

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

Link: http://nmap.org/

Upvotes: 0

Zimbabao
Zimbabao

Reputation: 8240

use command

 nc -l hostname 10000  > op.txt

Upvotes: 4

andri
andri

Reputation: 11292

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

Upvotes: 2

Related Questions