If you want to use a system call, you can telnet to port 80,
and issue the command "GET / HTTP/1.0" followed by two returns.
You'd have to filter the output for the line that starts with "Server:"

ex:

$ telnet <server> 80
Trying...
Connected to <server>.lmig.com.
Escape character is '^]'.
GET / HTTP/1.0

HTTP/1.1 200 OK
Date: Tue, 05 Feb 2002 13:20:01 GMT
Server: Apache/1.3.19 (Unix) PHP/4.0.6
X-Powered-By: PHP/4.0.6
Connection: close
Content-Type: text/html

.....

Patrick Bowe
Middleware Support
Liberty Mutual Insurance Group




-----Original Message-----
From: Next Step [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 05, 2002 4:12 AM
To: [EMAIL PROTECTED]
Subject: Re: Type of web server from socket ??


Do a HEAD request and analyze the string output and compare to DB list of
*every* webserver in this world, though it's not 100% correct but atleast
you can get the figure.


At 10:34 PM 2/4/2002 +0000, you wrote:
>Ho to get the name of the server running in a port in a host, for example I
>write a program that scan all the ip address that start from
155.108.000.000
>for the port 80, how to know if the web server that is running is IIS,
>Apache or Tomcat.
>thanks
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to