Get Port Banner?
-
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
-
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
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
-
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
-
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?
-
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
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.
-
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.
-
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.
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! :)