Octal

HTTP Get command terminates telnet.

17 posts in this topic

When I connect to a website using telnet, and type "get / HTTP/1.1" the telnet window closes. I hit enter twice too.

I am running ubuntu 6.06 Dapper, if that changes anything.

0

Share this post


Link to post
Share on other sites

Be VERY careful which web site you telnet to... Could have a bad outcome.

Alk3

0

Share this post


Link to post
Share on other sites

Be VERY careful which web site you telnet to... Could have a bad outcome.

Alk3

As in police?

Or as in, that is what is terminating the window.

0

Share this post


Link to post
Share on other sites

Be VERY careful which web site you telnet to... Could have a bad outcome.

Alk3

As in police?

Or as in, that is what is terminating the window.

As in if you don't have permission from the website you telnet to, some people can count that as a computer crime.

0

Share this post


Link to post
Share on other sites

Once you issue the GET command, it's just going to output some of the header HTML and then close the connection, that's normal as GET is just a short command.

0

Share this post


Link to post
Share on other sites

Be VERY careful which web site you telnet to... Could have a bad outcome.

Alk3

As in police?

Or as in, that is what is terminating the window.

As in if you don't have permission from the website you telnet to, some people can count that as a computer crime.

But on their end, they can't tell the difference between you telnetting there, and you surfing them through Internet Explorer. This isn't accessing unauthorized ressources, but publicly released webpages. So I'm surprised to see you write that. :huh:

0

Share this post


Link to post
Share on other sites

Be VERY careful which web site you telnet to... Could have a bad outcome.

Alk3

As in police?

Or as in, that is what is terminating the window.

As in if you don't have permission from the website you telnet to, some people can count that as a computer crime.

But on their end, they can't tell the difference between you telnetting there, and you surfing them through Internet Explorer. This isn't accessing unauthorized ressources, but publicly released webpages. So I'm surprised to see you write that. :huh:

Yes, that may be, but for starting, I will get the permission from the web administrator which I do have.

Edit: Thanks tehbiz. I missed your post earlier.

Edited by Octal
0

Share this post


Link to post
Share on other sites

When telnetting in, you could always enter in fake HTTP fields, so that it looks like a standard web

browser, instead of a telnet connection, but it's probably not a big deal... at all.

User-Agent: Mozilla/5.0

Edited by stderr
0

Share this post


Link to post
Share on other sites

type:

get / HTTP/1.1 *enter*

connection: keepalive (or keep-alive or something, i forget) *enter*

*enter*

and it wont terminate

0

Share this post


Link to post
Share on other sites

Be VERY careful which web site you telnet to... Could have a bad outcome.

There is nothing wrong with telnetting to port 80 on a WebServer and interacting with the web server.

There could be a bad outcome if the telnet port was left open on the webserver and you happen to use it for malicious activity.

0

Share this post


Link to post
Share on other sites

a web browser connects to the server in almost exactally the same way telnet does, except that it is automated to fill in forms and get the data to interpret, no computer crime here telnet away

0

Share this post


Link to post
Share on other sites

type:

get / HTTP/1.1 *enter*

connection: keepalive (or keep-alive or something, i forget) *enter*

*enter*

and it wont terminate

That helped, but both of them still terminated the telnet window. I'm going to search around for articles about this though.

0

Share this post


Link to post
Share on other sites

It is within the HTTP 1.1 standard that all clients must supply a host field in the headers. This allows one server to host multiple websites in a virtualhost. Otherwise every single domain would need its own IP, that would get old fast. If you're not supplying one then you're giving an invalid request which may or may not be completely ignored. Also in HTTP 1.1 all connecetions are assumed to be keep-alive unless stated otherwise.

Here's a full set of headers based on my default firefox ones that I have used in php

$host would be the domain and $path would be the URI of the specific page you want to request.

			$out = "GET " . $path . " HTTP/1.1\r\n"
. "Host: " . $host . "\r\n"
. "Connection: Close\r\n"
. "Accept: text/xml,application/xml,application/xhtml xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\n"
. "Accept-Language: en-us,en;q=0.5\r\n"
. "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n"
. "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6\r\n";

0

Share this post


Link to post
Share on other sites

first, make sure when you're telnetting to a webserver you mean THE webserver ie address:80 and not simply the URI/IP that points to the server itself....cos then it'd be just corky and get wouldn't work anyhow.

That being said; whatever telnet application you are using sounds like it closes the window automagically when it closes off connection, try using the consol version of telnet as the "window" will remain open even when the connection is severed.

As far as law is concerned you needn't any permission, by running a webserver they have given implicit agreement to your accessing their system ON port 80 for the purpose of retrieving the files related to the site, html, php output, etc. so you needn't get any permission, they won't know the difference, if this was a cause for legal action google's proprieters would be in a deep dark dungeon, cos google surely doesn't use IE to access webservers ;p....

Edited by rEph
0

Share this post


Link to post
Share on other sites

first, make sure when you're telnetting to a webserver you mean THE webserver ie address:80 and not simply the URI/IP that points to the server itself....cos then it'd be just corky and get wouldn't work anyhow.

That being said; whatever telnet application you are using sounds like it closes the window automagically when it closes off connection, try using the consol version of telnet as the "window" will remain open even when the connection is severed.

As far as law is concerned you needn't any permission, by running a webserver they have given implicit agreement to your accessing their system ON port 80 for the purpose of retrieving the files related to the site, html, php output, etc. so you needn't get any permission, they won't know the difference, if this was a cause for legal action google's proprieters would be in a deep dark dungeon, cos google surely doesn't use IE to access webservers ;p....

Thanks for everyone's replies... I know I didnt create this thread, but it is very informing. :devil:

Edited by Alk3
0

Share this post


Link to post
Share on other sites

From what you're doing, it sounds like you're running telnet directly.

Try doing "Start > Run > cmd" first, then doing "telnet servername 80". Normally, once it's got the web page, telnet exits, and if you had it running standalone, then the window would also close. Running it from under cmd means that when it exits, you can still see everything.

0

Share this post


Link to post
Share on other sites

From what you're doing, it sounds like you're running telnet directly.

Try doing "Start > Run > cmd" first, then doing "telnet servername 80". Normally, once it's got the web page, telnet exits, and if you had it running standalone, then the window would also close. Running it from under cmd means that when it exits, you can still see everything.

I think you missed the part about the parent running UBUNTU and not Windows.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now