Find out which webserver is behind a url
import System.Net
using response=WebRequest.Create("http://www.orkut.com").GetResponse():
print(response.Headers["Server"])
If you are behind a non-transparent firewall/proxy you may need to set the proxy credentials so the example would change a bit:
import System.Net
request = WebRequest.Create("http://www.orkut.com")
proxy = WebProxy.GetDefaultProxy()
proxy.Credentials = NetworkCredential("username", "password")
request.Proxy = proxy
using response=request.GetResponse():
print(response.Headers["Server"])
No comments:
Post a Comment