News for hackers. Stuff that matters.
Re:A Unix Utility You Should Know About: Netcat by pwk on Tuesday February 17, 2009 @12:45PM (#484740)
Sometimes handy for me: if you have information that you've sent in an HTTP POST, and you need to recover it for whatever reason, there's often no easy way to get at it from the browser interface. The browser will send the data again if you reload the page, so:

1. In a terminal, startup netcat as a listener:

  nc -l -p9999
2. In your browser, configure the connection preferences to use manual proxy settings of host "localhost" and port "9999"

3. Hit reload on the browser, and tell it "yup, send the POST data again"

4. Look at the output of netcat

(Don't forget to change your proxy settings back!)

Re:A Unix Utility You Should Know About: Netcat by there on Tuesday February 17, 2009 @01:28PM (#484794)
a firefox extension like tamper data is much easier than doing all that - https://addons.mozilla.org/en-US/firefox/addon/966

or just use a sniffer like wireshark and let it reconstruct the tcp stream - http://www.wireshark.org/

Re:A Unix Utility You Should Know About: Netcat by pwk on Tuesday February 17, 2009 @01:53PM (#484824)
Absolutely. I already wrote in another part of this discussion "Most of the things one wants or needs to do on the net are most easily accomplished with dedicated tools, so places where only netcat will serve are rare." On the other hand, my little trick does just take a few seconds, and is probably easier than getting ethereal (oops, wireshark) set up for someone new to it.

I do think it's still useful to be aware of and play with tools like netcat, even when there are dedicated tools to accomplish most tasks. It's a bit like hacking in assembly... probably not practical in many cases, but you'll learn how stuff works underneath, and that understanding can still be really useful even when working at a higher level of abstraction.

Re:A Unix Utility You Should Know About: Netcat by yeahit on Tuesday February 17, 2009 @06:02PM (#485122)
You might also like this way of looking at all the requests your browser is doing to a certain host:

http://en.gibney.org/capture_webtraffic/