[BusyBox] nc: Problems reaching some servers

Charles Steinkuehler charles at steinkuehler.net
Thu Feb 20 12:53:03 UTC 2003


Calle Be wrote:
> Jucklo!
> 
> I'm using busybox (what version? I dunno. where?) and am currently trying to
> netcat into komfram.trafikkontoret.goteborg.se. Now, this does not seem to
> work.
> 
> When I connect to other servers, I get a new line and type something like:
> 
>   GET /some_dir/some_file.html HTTP/1.0
> 
> nc then answers with the source of that file. However, when I type:
> 
>   nc komfram.trafikkontoret.goteborg.se 80
>   GET /some_dir/some_file.html HTTP/1.0
> 
> nothing happens. I can write all and anything I want, but nothing happens. What
> could possilby be wrong? I have tried the samething with a windows version of
> netcat (Netcat 1.10 for NT) and that works just fine. I have also tried with
> tkweb4.trafik.... and the ip. No result.

You probably have an improperly formatted http request.  You need the 
proper terminating string: "<CR><LF><CR><LF>" or some servers will not 
recognize your request.  While some servers tolerate <LF> and/or <CR> 
only end-of-lines, the RFC's say to use <CR><LF>

There could also be other issues (ie server responds only if you send 
appropriate data in various headers, and ignores you otherwise), but I 
suspect you're probably having a <CR><LF> problem.

-- 
Charles Steinkuehler
charles at steinkuehler.net





More information about the busybox mailing list