Results 1 to 10 of 10

Thread: Telnet to Port 80

  1. #1
    Junior Member
    Join Date
    Feb 2005
    Posts
    5

    Telnet to Port 80

    I am able to telnet to a computer on port 80. What Http commands can I issue? What can I do? What about the GET command. Someone please help with exact syntax.

    Thanks

  2. #2
    Yes, you can send requests just like your browser would. I would brush up on my typing skills if I were you to avoid a time out. you can find the syntax of an http request HERE.

    With a little hard work, you'll be rewarded with the root document in html format Yeay!!!!
    Always happens, I get all worked up to say somthing profound and bam!!! uh... whut were we talkin bout?

  3. #3
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    Note: when you see <enter> hit the enter key, don't type out <enter>
    Code:
    GET /<enter>
    <enter>
    gets you the contents of the default page, without headers
    Code:
    GET / HTTP/1.0<enter>
    <enter>
    gets you the contents of the default page with headers.
    Code:
    GET /file.html HTTP/1.0<enter>
    <enter>
    gets you the contents of file.html (which can be any file in the root directory of the webserver) with headers.
    Code:
    GET /directory1/directory2/file.html HTTP/1.0<enter>
    <enter>
    gets same as before except the file is located within two subdirectories.
    Code:
    GET / HTTP/1.1<enter>
    Host: www.site.com<enter>
    <enter>
    same as with HTTP/1.0 except you have send the host in your request. I guess this is so that virtual hosts can be used, I don't know what other purpose it serves. There are some others like POST, but that is what you will mainly be using. Have fun I guess, although I recommend a web browser, your web experience will be a lot better. Peace.

  4. #4
    Senior Member
    Join Date
    Dec 2003
    Location
    Pacific Northwest
    Posts
    1,675
    Good Evening,

    On the Main page look to the right and find the Tutorial Index (far right) and click on Main Index. In the seach bar, enter Telnet and click on search. A thread by Hollow man will get you started. Or just click below for the same thread. But don't be afraid to do some searching on your own, not only here but with google as well.


    http://www.antionline.com/showthread...hreadid=233245

    cheers
    Connection refused, try again later.

  5. #5
    Junior Member
    Join Date
    Feb 2005
    Posts
    5
    I get a lot of this:

    HTTP/1.1 400 Bad Request

    Server: Microsoft-IIS/5.0

    Date: Fri, 04 Feb 2005 04:18:36 GMT

    Content-Type: text/html

    Content-Length: 87



    <html><head><title>Error</title></head><body>The parameter is incorrect. </body>
    </html>

  6. #6
    Jaded Network Admin nebulus200's Avatar
    Join Date
    Jun 2002
    Posts
    1,356
    Originally posted here by leagacystorm
    I get a lot of this:

    HTTP/1.1 400 Bad Request

    Server: Microsoft-IIS/5.0

    Date: Fri, 04 Feb 2005 04:18:36 GMT

    Content-Type: text/html

    Content-Length: 87



    <html><head><title>Error</title></head><body>The parameter is incorrect. </body>
    </html>
    Then you are typoing.

    The commands are case sensitive.

    If you use HTTP/1.1, Host: is not optional.



    To get a list of what other commands are allowed by the server for the given directory try:

    OPTIONS <directory> HTTP/1.0


    I usually leave it at HTTP/1.0 for less typing, but if the server hosts multiple webservers, the Host token is very important for selecting the appropriate home directory structure. If you want to know the specifics and the syntax of the commands, a close reading of the HTTP standard (referenced earlier) is a must.
    There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.

    (Merovingian - Matrix Reloaded)

  7. #7
    Junior Member
    Join Date
    Feb 2005
    Posts
    5
    GET / HTTP/1.1 returns nothing
    GET / HTTP/1.0 returns the following:

    HTTP/1.1 404 Object Not Found

    Server: Microsoft-IIS/5.0

    Date: Fri, 04 Feb 2005 18:09:35 GMT

    Content-Length: 4040

    Content-Type: text/html



    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

    <html dir=ltr>



    <head>

    <style>

    a:link {font:8pt/11pt verdana; color:FF0000}

    a:visited {font:8pt/11pt verdana; color:#4e4e4e}

    </style>



    <META NAME="ROBOTS" CONTENT="NOINDEX">



    <title>The page cannot be found</title>



    <META HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-125

    </head>



    <script>

    function Homepage(){

    <!--

    // in real bits, urls get returned to our script like this:

    // res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm



    //For testing use DocURL = "res://shdocvw.dll/http_404.htm#https://www.m
    icrosoft.com/bar.htm"

    DocURL = document.URL;



    //this is where the http or https will be, as found by searching for ://
    but skipping the res://

    protocolIndex=DocURL.indexOf("://",4);



    //this finds the ending slash for the domain se

    serverIndex=DocURL.indexOf("/",protocolIndex + 3);



    //for the href, we need a valid URL to the domain. We search for
    the # symbol to find the begining

    //of the true URL, and add 1 to skip it - this is the BeginURL value. We
    use serverIndex as the end marker.

    //urlresult=DocURL.substring(protocolIndex - 4,serverIndex);

    BeginURL=DocURL.indexOf("#",1) + 1;



    urlresult=DocURL.substring(BeginURL,serverIndex);



    //for display, we need to skip after ht

    displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);



    InsertElementAnchor(urlresult, displayresult);

    }



    function HtmlEncode(text)

    {

    return text.replace(/&/g, '&amp').replace(/'/g, '"').replace(/</g, '&lt
    ;').replace(/>/g, '>');

    }



    function TagAttrib(name, value)

    {

    return ' '+name+'="'+HtmlEncode(value)+'"';

    }



    function PrintTag(tagName, needCloseTag, attrib, inner){

    document.write( '<' + tagName + attrib + '>' + HtmlEncode(inner) );

    if (needCloseTag) document.write( '</' + tagName +'>' );

    }



    function URI(href)

    {

    IEVer = window.navigator.appVersion;

    IEVer = IEVer.substr( IEVer.indexOf('MSIE') + 5, 3 );



    return (IEVer.charAt(1)=='.' && IEVer >= '5.5') ?

    encodeURI(href) :

    escape(href).replace(/%3A/g, ':').replace(/%3B/g, ';');

    }



    function InsertElementAnchor(href, text)

    {

    PrintTag('A', true, TagAttrib('HREF', URI(href)), text);

    }



    //-->

    </script>



    <body bgcolor="FFFFFF">



    <table width="410" cellpadding="3" cellspacing="5">



    <tr>

    <td align="left" valign="middle" width="360">

    <h1 style="COLOR:000000; FONT: 13pt/15pt verdana"><!--Problem-->The page
    cannot be found</h1>

    </td>

    </tr>



    <tr>

    <td wid

  8. #8
    Jaded Network Admin nebulus200's Avatar
    Join Date
    Jun 2002
    Posts
    1,356
    Well, it could be one of a few things.

    1) It could not have an index and could not be allowing directory listings...so when you ask it for /, normally the web server will server up the index file (index.htm, index.html, index.asp, etc), in essense a redirect. If there isn't an index and they don't allow directory listings, you could potentially get this.

    2) I also noticed that the server is responding in HTTP/1.1, so it may be requiring that you use HTTP/1.1. You are not completing the HTTP/1.1 correctly, so that might be it as well. Try this:

    GET / HTTP/1.1
    Host: <ip>

    Where <ip> is the IP of the webserver. It would be better if you used the actual domain name if possible, but if not, use the IP. LIke I said earlier, it is requried to have the host token for 1.1.
    There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.

    (Merovingian - Matrix Reloaded)

  9. #9
    Junior Member
    Join Date
    Feb 2005
    Posts
    5
    Would this matter; you cannot reach the server by a DNS name, it doesn't have one. I get to it by an IP address. What about the OPTIONS command. What can I try for the <directory>parametor?

  10. #10
    Jaded Network Admin nebulus200's Avatar
    Join Date
    Jun 2002
    Posts
    1,356
    Like I said earlier, if it doesn't have a DNS name, for the Host: token, use the ip address : Host: <ip>

    For the options, <directory> means substitute whatever directory you want to ask about....

    For example, if the server was 192.168.0.1:

    OPTIONS / HTTP/1.1
    Host: 192.168.0.1
    There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.

    (Merovingian - Matrix Reloaded)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •