Script telnet on webserver

Posted by Kami on Stack Overflow See other posts from Stack Overflow or by Kami
Published on 2010-03-24T16:50:15Z Indexed on 2010/03/24 16:53 UTC
Read the original article Hit count: 334

Filed under:
|
|

Hi

I would like to script telnet to test my website inputs handling. I can do it manually :

telnet localhost 8888
...
GET / HTTP/1.1\n
Host: localhost


...html response

But I can pass command to telnet in my shell script !

I've tried :

(echo "GET / HTTP/1.1\n"; echo "Host: localhost \n\n"; sleep 1) | telnet localhost 8888

It produces no results at all !

© Stack Overflow or respective owner

Related posts about bash

Related posts about scripting