Networking Forums

Networking Forums > Computer Networking > Linux Networking > netcat problem

Reply
Thread Tools Display Modes

netcat problem

 
 
Oliver Cole
Guest
Posts: n/a

 
      09-15-2003, 05:30 PM
I want to send a basic HTTP request to a web server as part of my network
checking script.

I try:

echo "GET / HTTP/1.1" ; echo | nc host port

AFAIK this should spit whatever it receives to stdout... but I get
nothing. Any ideas?
 
Reply With Quote
 
 
 
 
Horst Knobloch
Guest
Posts: n/a

 
      09-15-2003, 06:30 PM
Oliver Cole <(E-Mail Removed)> wrote:

> echo "GET / HTTP/1.1" ; echo | nc host port


( echo "GET / HTTP/1.1" ; echo ) | nc host port

Ciao, Horst
--
»When pings go wrong (It hurts me too)« E.Clapton/E.James/P.Tscharn
 
Reply With Quote
 
Michael Heiming
Guest
Posts: n/a

 
      09-15-2003, 11:04 PM
Horst Knobloch <(E-Mail Removed)> wrote:
> Oliver Cole <(E-Mail Removed)> wrote:


> > echo "GET / HTTP/1.1" ; echo | nc host port


> ( echo "GET / HTTP/1.1" ; echo ) | nc host port


Or even:

echo -e "GET / HTTP/1.1\n" | nc host port

--
Michael Heiming

Remove +SIGNS and www. if you expect an answer, sorry for
inconvenience, but I get tons of SPAM
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use netcat??? Kolyn_Kryw Windows Networking 1 04-11-2008 04:14 PM
Problem when using netcat( nc ) to debug network program Steven Woody Linux Networking 0 07-18-2007 10:52 AM
Problem opening a listening port using netcat ( or other server ) bradphelan Linux Networking 3 10-06-2006 08:04 PM
netcat for win2k Mike - EMAIL IGNORED Linux Networking 3 03-09-2006 10:57 PM
Netcat problem - please help Piotrek Linux Networking 4 03-03-2004 06:37 PM



1 2 3 4 5 6 7 8 9 10 11