Rudimentary IP Dump
Tuesday, 20. July 2010
Would you like to dump an IP interraction without much fuss? If you have netcat, it’s remarkably easy.
cat |tee -a smtpdump | nc mail.linuxcommando.com 25 | tee -a smtpdump
your exchange, in addition to taking place on your terminal, will also be appended to ./smtpdump, assuming your version of tee matches mine (GNU Coreutils 8.5). If you can speak SMTP, you can talk to the mail server and deliver me a message.
Exchange the cat for another netcat, listening on a local port:
nc -l localhost -p 2500 |tee -a smtpdump | nc mail.linuxcommando.com 25 | tee -a smtpdump
You can then telnet into localhost:2500 and record the entire conversation in smtpdump. With a little imagination, you can come up with all sorts of fun ways to use it.