Home > IT, Tools > NetCat and LF vs CRLF

NetCat and LF vs CRLF

November 18th, 2007 Leave a comment Go to comments

I was attempting to grab a web page via netcat the other day, and my GET / HTTP/1.0<enter><enter> appeared to simply hang. I mentioned this to a colleague who pointed out that netcat only sends line-feed (LF / 0x0A), not carriage-return line-feed (CRLF / 0x0D0A). I did some playing around and it turns out that you can simulate CRLF while using *nix by sending the following Ctrl+V<enter><enter>. Ctrl+V<enter> is translated into CR and then <enter> alone sends the expected LF.

This unfortunately doesn't work in Windows, so I'll pose a question to my readers. Does anyone know of a way to simulate CRLF using netcat in Windows?

Categories: IT, Tools Tags:

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

  1. November 18th, 2007 at 02:58 | #1

    I just tested it with NC for Windows, and it seems to work fine. Also, you could use unix2dos to convert a textfile and feed it into NC (most probably, I didn’t test it thought):

    unix2dos query
    cat query > nc google.com 80

  2. Tyop?
    November 18th, 2007 at 08:58 | #2

    telnet proto use CRLF no ?
    try to use telnet compatibility of netcat. `man netcat`

  3. November 21st, 2007 at 22:02 | #3

    dude, grap the source code and change it to CRLF.

  4. Cd-MaN
    January 19th, 2009 at 14:20 | #4

    I just tested it with NC for Windows, and it seems to work fine. Also, you could use unix2dos to convert a textfile and feed it into NC (most probably, I didn't test it thought):

    unix2dos query
    cat query &gt; nc google.com 80

  5. guest
    May 18th, 2010 at 04:13 | #5

    what bugfree said is the only solution. I've been searching for it, too. Maybe ms gurus can have such answer or they forgot to do this, uh.

  1. No trackbacks yet.