how to feed a file to telnet
Posted
by knittl
on Stack Overflow
See other posts from Stack Overflow
or by knittl
Published on 2010-04-14T17:06:29Z
Indexed on
2010/04/14
17:13 UTC
Read the original article
Hit count: 322
hello community,
understanding http and headers i played around with telnet to send requests. to not type everything again and again and again i thought i'd write a small textfile with all the commands i need.
my file is as simple as follows:
GET /somefile.php HTTP/1.1
Host: localhost
i then try to feed it to telnet with io-redirection:
$ telnet localhost 80 < telnet.txt
but all output i get is
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
what am i doing wrong?
© Stack Overflow or respective owner