Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Get Port Banner?

Get Port Banner?

Scheduled Pinned Locked Moved C / C++ / MFC
helptoolstutorialquestion
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ALLERSLIT
    wrote on last edited by
    #1

    Hey, I need to earn some points in my IT class and thought about writing a tool that would tell you what runs on a specific port, in this case port 80. Now it would most likely be a webserver, finding that out is no problem by checking for specific strings such as "" etc.. My problem is though, I would like to know what kinda Webserver runs on that port. How would I do that? Unfortunately the replies are not really formated, so its really hard to filter it out. Example:

    is what I recv() when i send() to 109.70.146.167 on port 80.

    That does not actually help me though, as the banner is not always the last message..
    Sometimes the banner is not even in it at all..

    65.39.148.34 on port 80

    I did some google digging and found out about certain tools that

    L 1 Reply Last reply
    0
    • A ALLERSLIT

      Hey, I need to earn some points in my IT class and thought about writing a tool that would tell you what runs on a specific port, in this case port 80. Now it would most likely be a webserver, finding that out is no problem by checking for specific strings such as "" etc.. My problem is though, I would like to know what kinda Webserver runs on that port. How would I do that? Unfortunately the replies are not really formated, so its really hard to filter it out. Example:

      is what I recv() when i send() to 109.70.146.167 on port 80.

      That does not actually help me though, as the banner is not always the last message..
      Sometimes the banner is not even in it at all..

      65.39.148.34 on port 80

      I did some google digging and found out about certain tools that

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      I don't think you can do this as the response that you get from any web server depends entirely on that server. There is no standard format that will give you a consistent piece of information; just surf a few different sites to see.

      Just say 'NO' to evaluated arguments for diadic functions! Ash

      A 1 Reply Last reply
      0
      • L Lost User

        I don't think you can do this as the response that you get from any web server depends entirely on that server. There is no standard format that will give you a consistent piece of information; just surf a few different sites to see.

        Just say 'NO' to evaluated arguments for diadic functions! Ash

        A Offline
        A Offline
        ALLERSLIT
        wrote on last edited by
        #3

        Yea, I just found that out too, so I digged some more and found out about some webscanner or whatever they are called. How do those tools get literally every(for webservers atleast) banner though?

        L 1 Reply Last reply
        0
        • A ALLERSLIT

          Yea, I just found that out too, so I digged some more and found out about some webscanner or whatever they are called. How do those tools get literally every(for webservers atleast) banner though?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          No idea, I'm a simple C++ programmer. What exactly do you mean by 'banner', is it some special piece of HTML?

          Just say 'NO' to evaluated arguments for diadic functions! Ash

          A 1 Reply Last reply
          0
          • L Lost User

            No idea, I'm a simple C++ programmer. What exactly do you mean by 'banner', is it some special piece of HTML?

            Just say 'NO' to evaluated arguments for diadic functions! Ash

            A Offline
            A Offline
            ALLERSLIT
            wrote on last edited by
            #5

            Banner is like a name that identifies the service that runs on the port. Iam just look for a way to identify what service/program runs on a port. Example: For an ftp it's the first reply: 220-FileZilla Server version 0.9.34 beta Iam looking for something similiar that works for webservers.

            L M 2 Replies Last reply
            0
            • A ALLERSLIT

              Banner is like a name that identifies the service that runs on the port. Iam just look for a way to identify what service/program runs on a port. Example: For an ftp it's the first reply: 220-FileZilla Server version 0.9.34 beta Iam looking for something similiar that works for webservers.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Well known port numbers are as defined here[^]. Also if you look here[^] you will see that there is no HTML tag that describes the information you are looking for.

              Just say 'NO' to evaluated arguments for diadic functions! Ash

              1 Reply Last reply
              0
              • A ALLERSLIT

                Banner is like a name that identifies the service that runs on the port. Iam just look for a way to identify what service/program runs on a port. Example: For an ftp it's the first reply: 220-FileZilla Server version 0.9.34 beta Iam looking for something similiar that works for webservers.

                M Offline
                M Offline
                Moak
                wrote on last edited by
                #7

                ALLERSLIT wrote:

                Banner is like a name that identifies the service that runs on the port. Iam just look for a way to identify what service/program runs on a port.

                Check the HTTP response headers. Some web servers include a Server header in every response, e.g. Server: Apache/1.2.3. Practically, you take a HTTP client class, make a dummy request and evaluate the response headers. It's a simple way to identify the web server software running on that port, it is not reliable as you can often configure or omit this information on the server side. Happy coding! :)

                Chat in Europe :java: Now with 24% more Twitter

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups