telnet port 80?

Valhalla1

Diamond Member
Oct 13, 1999
8,678
0
76
okay, I know you can telnet to port 80 of the ip of a web server, but I don't know what commands are valid once you do that.

is there a command to list the files in the current directory? "ls" and "dir" won't work.

and can you change to sub directories and explore this way (view-only of course?)


or is there any other way to obtain a file listing for a particular directory of a web server? like sometimes if someone stores images for their site in blahblah.com/images/1.jpg, etc. you can just go to blahblah.com/images/ and if there is no index.html in that folder, you will see a listing of all the files.. but how else can you do it, if say they do have an index.html in that dir.?
 

Russ

Lifer
Oct 9, 1999
21,093
3
0
I don't think telnet uses port 80, that's html. I could be wrong, but I think it uses port 23. The command "dir" should work fine on a Unix/Linux server, as should "cd" for change directory.

EDIT: Okay, I just telnetted in to one of my sites and both DIR and CD do indeed work fine.

Russ, NCNE
 

DAM

Diamond Member
Jan 10, 2000
6,102
1
76
russ is right, telnet is 23, web is 80, unless the server is config to receive connections on that port it wont go.




dam()
 

Valhalla1

Diamond Member
Oct 13, 1999
8,678
0
76
I know telnet is port 23 default. but that doesnt mean anything, you can run a telnet server on any tcp/ip port address, and I know you can telnet to the listen port of an http server, and issue commands, but I didn't know what commands are valid
 

Russ

Lifer
Oct 9, 1999
21,093
3
0
If your goal is to check file listings, I just gave you the two commands you'll need.

Russ, NCNE
 

Russ

Lifer
Oct 9, 1999
21,093
3
0
Telnet requires you to login with a valid ID and password. It's not like anonymous FTP.

Russ, NCNE
 

Valhalla1

Diamond Member
Oct 13, 1999
8,678
0
76
gahhhh.. dammit russ, you're missing the point.

I know telnet works w/ user/pass. but you don't have to issue a user/pass to telnet to the http port of a web server.



someone back me up here and explain that yes, you CAN telnet to port 80 of a web server :|

 

Valhalla1

Diamond Member
Oct 13, 1999
8,678
0
76
gahhhh.. dammit russ, you're missing the point.

I know telnet works w/ user/pass. but you don't have to issue a user/pass to telnet to the http port of a web server.



someone back me up here and explain that yes, you CAN telnet to port 80 of a web server :|

 

Russ

Lifer
Oct 9, 1999
21,093
3
0


<< you CAN telnet to port 80 of a web server >>



ONLY if the webmaster has it listening on port 80, which would be pretty stupid to do considering the power of telnet access.

Russ, NCNE
 

Valhalla1

Diamond Member
Oct 13, 1999
8,678
0
76
example : telnet to www.yahoo.com PORT 80

type :

GET /index.html HTTP/1.1 (enter)


and you'll see what I mean. I was wondering if there is a way to do a file listing (doubt it, but its worth a shot I suppose)
 

Motorheader

Diamond Member
Sep 3, 2000
3,682
0
0
You can telnet to many common ports - an example is that many Universities still have e-mail clients setup using telnet to the mail server.

Point is that you still need some type of authorization/authentication to have the ability to browse no matter what port you telnet to. Also depends on what client settings you are using to emulate. Yahoo and almost all websites would be in a heap of doo-doo if you could just telnet in and browse file listings.

Russ is not missing the point here.
 

frostgiant

Senior member
Jun 19, 2000
258
0
0
Valhalla1: No, unfortunatley there is not. If you want to know all the commands you can do, get a hold of the RFC HTML document. You should be able to find it on Yahoo.
 

Valhalla1

Diamond Member
Oct 13, 1999
8,678
0
76
well, you can already &quot;browse&quot; the yahoo web server directory structure, but only by way of hyperlinks on existing documents.

OR if for some reason they leave out the index document in a particular directory, your browser normally generates a pre-made page displaying the file listing of the current directory.

but I'm trying to find some other way. :(
 

Warpo

Member
Sep 21, 2000
143
0
0
&quot;I was wondering if there is a way to do a file listing &quot;
No you can't, unlexx there is no index page, and the server is set to list the files/direcotires if no index page is found (for each directory)
 

JenniZ

Member
Nov 14, 2000
188
0
0
You can telnet to an HTTPD server.


<<
[jenniz@main:~]# telnet compucheap.com 80
Trying 216.157.33.48...
Connected to compucheap.com.
Escape character is '^]'.
>>



To my knowledge I dont know what commands you can issue it. Im sure a webbrowser sends commands, to grab the index.html.



<<
Connected to compucheap.com.
Escape character is '^]'.
get
<!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML 2.0//EN&quot;>
<HTML><HEAD>
<TITLE>501 Method Not Implemented</TITLE>
</HEAD><BODY>
<H1>Method Not Implemented</H1>
get to /index.html not supported.<P>
Invalid method in request get<P>
</BODY></HTML>
Connection closed by foreign host.
>>



Telnet is an application that doesnt require you to telnet to a telnet server. You can telnet to many ports, like even ftp (port 21) and issue commands.
 

nateholtrop

Diamond Member
Jun 8, 2000
5,349
0
0
telnet : 23
secure telnet is either 22 or 21


not sure


if you ftp with a port it is XXX.XXX.XXX.XXX XXXXX

:)

Nate
 

arcain

Senior member
Oct 9, 1999
932
0
0
Most every Internet protocol is text based (SMTP, POP, HTTP, FTP). So using a terminal program (not necessarily a telnet program, as telnet includes many additional protocol features), you can connect to any of the ports that have servers listening on them, and type commands as if a webbrowser or mail client was issueing them.

As for what you commands you can issues, those depend on the servers. To find out what commands are available search for 'RFC' and whatever protocol (ie 'RFC HTTP'). For HTTP, you use the GET command to retrieve information. You will not be able to obtain a directory listing usually. The directory listing you see in you webbrowser is usually a webpage generated on the fly by the webserver.