ajithkp560

Server_Look_xXx_Damn_Small_Scanner

Jul 29th, 2012
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.24 KB | None | 0 0
  1. import httplib
  2. import socket
  3. import sys
  4. print "\n\n\t|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"
  5. print "\t|||||                                  www.teamopenfire.com |||||"
  6. print "\t|||||                                                       |||||"
  7. print "\t|||||        Coded By Ajith KP:::Coded By Ajith KP          |||||"
  8. print "\t|||||                                                       |||||"
  9. print "\t||||| [email protected]         [email protected] |||||"
  10. print "\t|||||                  openfire-security.net              |||||"
  11. print "\t|||||              www.suckthetech.blogspot.com             |||||"
  12. print "\t|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"
  13. try:
  14.     try:
  15.         site = raw_input("Web Site for Scan?: ")
  16.         site = site.replace("http://","")
  17.         site = site.replace("https://","")
  18.         print ("\tChecking website " + site + "...")
  19.         conn = httplib.HTTPConnection(site)
  20.         conn.connect()
  21.         print "\t[$] Yes... Server is Online."
  22.     except (httplib.HTTPResponse, socket.error) as Exit:
  23.         print("\t [!] Oops Error occured")
  24.         raw_input("\t [!] Possible problems: Server offline, Invalid URL,Internet offline")      
  25.         exit()
  26.     conn = httplib.HTTPConnection(site)
  27.     conn.request("HEAD", "/")
  28.     req = conn.getresponse()
  29.     print "\n\t################################################################"
  30.     print "\n\t     [+] Server: "+req.getheader('server')
  31.     power = req.getheader('x-powered-by')
  32.     if power == None:
  33.         print "\t     [X] Powered by: Not Found !"
  34.     else:
  35.         print "\t     [+] Powered by: "+ power
  36.     print "\t     [+] Encoded in: "+req.getheader('Content-type')
  37.     cookie = req.getheader('Set-Cookie')
  38.     if cookie == None:
  39.         print "\t     [X] Set Cookie Failed"
  40.     else:
  41.         print "\t     [+] Set Cookie: "+cookie
  42.     print "\n\t################################################################"
  43.  
  44.  
  45.     print "Greets To Coded32 and all members of TeamOpenFire"
  46. except (httplib.HTTPResponse, socket.error):
  47.     print "\n\t[!] Session Cancelled; Error occured. Check internet settings"
  48. except (KeyboardInterrupt, SystemExit):
  49.     print "\n\t[!] Session cancelled"
Advertisement
Add Comment
Please, Sign In to add comment