• Post Reply Bookmark Topic Watch Topic
  • New Topic

Telnet and stuff  RSS feed

 
Neil Forrest
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
So I'm taking this course about the Internet, and I'm suppose to telnet into a web server, type in a one line request message for some object on the server to see a HTTP response message. First off this book assumes I know how to telnet into a web server, wrong! Can anyone explain in simple language what I have to do?

Thanks,
Neil
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm leaving out the details, since this is an assigment you are supposed to do.

Generally, telnet is called with the host name as parameter, so it would be something like "telnet www.server.com" on the command line. But the default telnet port is 23 (I think), while the default port for the web is 80. So you need to figure out how to pass a different port number to telnet (which is easy).

In a second step, you need to enter a valid HTTP request into telnet once it has started up. So you need to read up on HTTP what that looks like; the easiest would be a GET request that retrieves the root page, i.e. what you see when you go to "http://www.server.com/" in a browser.

If you use Firefox, you can use the very handy extension LiveHTTPHeaders to see what requests it send out. That should help with this.
[ May 19, 2006: Message edited by: Ulf Dittmer ]
 
Martin Simons
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes telnet default is port 23. Also, don't forget after typing in the
request to hit enter/return twice, otherwise the server will continue to
wait for the end of the header until it gets a timeout. And be quick
about typing in your request, because the timeout is, generally speaking,
not very long and the connection will simply be cut while you are still
typing your request if you are not quick enough.
 
Neil Forrest
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I figured out most of it but I've got another question. When I telnet in with port 80 then CRLF I get a black screen and anything I type in doesn't show up, only a cursor moves with the keystrokes. It's really annoying not knowing if I've made a mistake. Is this what is suppose to happen?

Neil
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!