寻找网站后台地址的python脚本

#!/usr/bin/python
# This was written for educational purpose only. Use it at your own risk.
# Author will be not responsible for any damage!
#
#################################################################
# ______  ____  ____                    #
# |  _ \  \  \ /  /                   #
# | |_) |  \  \/  /                    #
# |  _ <   \_  _/                    #
# | |_) |   | |                     #
# |______/    |__|                     #
#                                #
#  ______   __  _____        ____    __ ___   #
#  / ____/_ __/ /_ |__ /______   __/ __ \_____/ |/ /  #
# / /  / / / / __ \ /_ </ ___/ | /| / / / / / ___/ /|_/ /   #
# / /___/ /_/ / /_/ /__/ / /  | |/ |/ / /_/ / / / / / /   #
# \____/\__, /_.___/____/_/  |__/|__/\____/_/ /_/ /_/    #
#   /____/                          #
#################################################################  import httplib import socket import sys 

 try:
  print "\t################################################################"
  print "\t#         ADMIN FINDER TOOL              #"
  print "\t#            VISIT                 #"
  print "\t#    http://www.facebook.com/BackTrack.Fan.Page      #"
  print "\t#                               #"
  print "\t#                    Written by Cyb3rw0rM  #"
  print "\t################################################################"
  var1=0
  var2=0

  php = ['admin/','administrator/','admin1/','admin2/','admin3/','admin4/','admin5/','usuarios/','usuario/','administrator/','moderator/','webadmin/','adminarea/','bb-admin/','adminLogin/','admin_area/','panel-administracion/','instadmin/', 'memberadmin/','administratorlogin/','adm/','admin/account.php','admin/index.php','admin/login.php','admin/admin.php','admin/account.php', 'admin_area/admin.php','admin_area/login.php','siteadmin/login.php','siteadmin/index.php','siteadmin/login.html','admin/account.html','admin/index.html','admin/login.html','admin/admin.html', 'admin_area/index.php','bb-admin/index.php','bb-admin/login.php','bb-admin/admin.php','admin/home.php','admin_area/login.html','admin_area/index.html', 'admin/controlpanel.php','admin.php','admincp/index.asp','admincp/login.asp','admincp/index.html','admin/account.html','adminpanel.html','webadmin.html', 'webadmin/index.html','webadmin/admin.html','webadmin/login.html','admin/admin_login.html','admin_login.html','panel-administracion/login.html', 'admin/cp.php','cp.php','administrator/index.php','administrator/login.php','nsw/admin/login.php','webadmin/login.php','admin/admin_login.php','admin_login.php', 'administrator/account.php','administrator.php','admin_area/admin.html','pages/admin/admin-login.php','admin/admin-login.php','admin-login.php', 'bb-admin/index.html','bb-admin/login.html','acceso.php','bb-admin/admin.html','admin/home.html','login.php','modelsearch/login.php','moderator.php','moderator/login.php', 'moderator/admin.php','account.php','pages/admin/admin-login.html','admin/admin-login.html','admin-login.html','controlpanel.php','admincontrol.php', 'admin/adminLogin.html','adminLogin.html','admin/adminLogin.html','home.html','rcjakar/admin/login.php','adminarea/index.html','adminarea/admin.html', 'webadmin.php','webadmin/index.php','webadmin/admin.php','admin/controlpanel.html','admin.html','admin/cp.html','cp.html','adminpanel.php','moderator.html', 'administrator/index.html','administrator/login.html','user.html','administrator/account.html','administrator.html','login.html','modelsearch/login.html', 'moderator/login.html','adminarea/login.html','panel-administracion/index.html','panel-administracion/admin.html','modelsearch/index.html','modelsearch/admin.html', 'admincontrol/login.html','adm/index.html','adm.html','moderator/admin.html','user.php','account.html','controlpanel.html','admincontrol.html', 'panel-administracion/login.php','wp-login.php','adminLogin.php','admin/adminLogin.php','home.php','admin.php','adminarea/index.php', 'adminarea/admin.php','adminarea/login.php','panel-administracion/index.php','panel-administracion/admin.php','modelsearch/index.php', 'modelsearch/admin.php','admincontrol/login.php','adm/admloginuser.php','admloginuser.php','admin2.php','admin2/login.php','admin2/index.php','usuarios/login.php', 'adm/index.php','adm.php','affiliate.php','adm_auth.php','memberadmin.php','administratorlogin.php'] 

  asp = ['admin/','administrator/','admin1/','admin2/','admin3/','admin4/','admin5/','moderator/','webadmin/','adminarea/','bb-admin/','adminLogin/','admin_area/','panel-administracion/','instadmin/', 'memberadmin/','administratorlogin/','adm/','account.asp','admin/account.asp','admin/index.asp','admin/login.asp','admin/admin.asp', 'admin_area/admin.asp','admin_area/login.asp','admin/account.html','admin/index.html','admin/login.html','admin/admin.html', 'admin_area/admin.html','admin_area/login.html','admin_area/index.html','admin_area/index.asp','bb-admin/index.asp','bb-admin/login.asp','bb-admin/admin.asp', 'bb-admin/index.html','bb-admin/login.html','bb-admin/admin.html','admin/home.html','admin/controlpanel.html','admin.html','admin/cp.html','cp.html', 'administrator/index.html','administrator/login.html','administrator/account.html','administrator.html','login.html','modelsearch/login.html','moderator.html', 'moderator/login.html','moderator/admin.html','account.html','controlpanel.html','admincontrol.html','admin_login.html','panel-administracion/login.html', 'admin/home.asp','admin/controlpanel.asp','admin.asp','pages/admin/admin-login.asp','admin/admin-login.asp','admin-login.asp','admin/cp.asp','cp.asp', 'administrator/account.asp','administrator.asp','acceso.asp','login.asp','modelsearch/login.asp','moderator.asp','moderator/login.asp','administrator/login.asp', 'moderator/admin.asp','controlpanel.asp','admin/account.html','adminpanel.html','webadmin.html','pages/admin/admin-login.html','admin/admin-login.html', 'webadmin/index.html','webadmin/admin.html','webadmin/login.html','user.asp','user.html','admincp/index.asp','admincp/login.asp','admincp/index.html', 'admin/adminLogin.html','adminLogin.html','admin/adminLogin.html','home.html','adminarea/index.html','adminarea/admin.html','adminarea/login.html', 'panel-administracion/index.html','panel-administracion/admin.html','modelsearch/index.html','modelsearch/admin.html','admin/admin_login.html', 'admincontrol/login.html','adm/index.html','adm.html','admincontrol.asp','admin/account.asp','adminpanel.asp','webadmin.asp','webadmin/index.asp', 'webadmin/admin.asp','webadmin/login.asp','admin/admin_login.asp','admin_login.asp','panel-administracion/login.asp','adminLogin.asp', 'admin/adminLogin.asp','home.asp','admin.asp','adminarea/index.asp','adminarea/admin.asp','adminarea/login.asp','admin-login.html', 'panel-administracion/index.asp','panel-administracion/admin.asp','modelsearch/index.asp','modelsearch/admin.asp','administrator/index.asp', 'admincontrol/login.asp','adm/admloginuser.asp','admloginuser.asp','admin2.asp','admin2/login.asp','admin2/index.asp','adm/index.asp', 'adm.asp','affiliate.asp','adm_auth.asp','memberadmin.asp','administratorlogin.asp','siteadmin/login.asp','siteadmin/index.asp','siteadmin/login.html'] 

  cfm = ['admin/','administrator/','admin1/','admin2/','admin3/','admin4/','admin5/','usuarios/','usuario/','administrator/','moderator/','webadmin/','adminarea/','bb-admin/','adminLogin/','admin_area/','panel-administracion/','instadmin/', 'memberadmin/','administratorlogin/','adm/','admin/account.cfm','admin/index.cfm','admin/login.cfm','admin/admin.cfm','admin/account.cfm', 'admin_area/admin.cfm','admin_area/login.cfm','siteadmin/login.cfm','siteadmin/index.cfm','siteadmin/login.html','admin/account.html','admin/index.html','admin/login.html','admin/admin.html', 'admin_area/index.cfm','bb-admin/index.cfm','bb-admin/login.cfm','bb-admin/admin.cfm','admin/home.cfm','admin_area/login.html','admin_area/index.html', 'admin/controlpanel.cfm','admin.cfm','admincp/index.asp','admincp/login.asp','admincp/index.html','admin/account.html','adminpanel.html','webadmin.html', 'webadmin/index.html','webadmin/admin.html','webadmin/login.html','admin/admin_login.html','admin_login.html','panel-administracion/login.html', 'admin/cp.cfm','cp.cfm','administrator/index.cfm','administrator/login.cfm','nsw/admin/login.cfm','webadmin/login.cfm','admin/admin_login.cfm','admin_login.cfm', 'administrator/account.cfm','administrator.cfm','admin_area/admin.html','pages/admin/admin-login.cfm','admin/admin-login.cfm','admin-login.cfm', 'bb-admin/index.html','bb-admin/login.html','bb-admin/admin.html','admin/home.html','login.cfm','modelsearch/login.cfm','moderator.cfm','moderator/login.cfm', 'moderator/admin.cfm','account.cfm','pages/admin/admin-login.html','admin/admin-login.html','admin-login.html','controlpanel.cfm','admincontrol.cfm', 'admin/adminLogin.html','acceso.cfm','adminLogin.html','admin/adminLogin.html','home.html','rcjakar/admin/login.cfm','adminarea/index.html','adminarea/admin.html', 'webadmin.cfm','webadmin/index.cfm','webadmin/admin.cfm','admin/controlpanel.html','admin.html','admin/cp.html','cp.html','adminpanel.cfm','moderator.html', 'administrator/index.html','administrator/login.html','user.html','administrator/account.html','administrator.html','login.html','modelsearch/login.html', 'moderator/login.html','adminarea/login.html','panel-administracion/index.html','panel-administracion/admin.html','modelsearch/index.html','modelsearch/admin.html', 'admincontrol/login.html','adm/index.html','adm.html','moderator/admin.html','user.cfm','account.html','controlpanel.html','admincontrol.html', 'panel-administracion/login.cfm','wp-login.cfm','adminLogin.cfm','admin/adminLogin.cfm','home.cfm','admin.cfm','adminarea/index.cfm', 'adminarea/admin.cfm','adminarea/login.cfm','panel-administracion/index.cfm','panel-administracion/admin.cfm','modelsearch/index.cfm', 'modelsearch/admin.cfm','admincontrol/login.cfm','adm/admloginuser.cfm','admloginuser.cfm','admin2.cfm','admin2/login.cfm','admin2/index.cfm','usuarios/login.cfm', 'adm/index.cfm','adm.cfm','affiliate.cfm','adm_auth.cfm','memberadmin.cfm','administratorlogin.cfm'] 

  js = ['admin/','administrator/','admin1/','admin2/','admin3/','admin4/','admin5/','usuarios/','usuario/','administrator/','moderator/','webadmin/','adminarea/','bb-admin/','adminLogin/','admin_area/','panel-administracion/','instadmin/', 'memberadmin/','administratorlogin/','adm/','admin/account.js','admin/index.js','admin/login.js','admin/admin.js','admin/account.js', 'admin_area/admin.js','admin_area/login.js','siteadmin/login.js','siteadmin/index.js','siteadmin/login.html','admin/account.html','admin/index.html','admin/login.html','admin/admin.html', 'admin_area/index.js','bb-admin/index.js','bb-admin/login.js','bb-admin/admin.js','admin/home.js','admin_area/login.html','admin_area/index.html', 'admin/controlpanel.js','admin.js','admincp/index.asp','admincp/login.asp','admincp/index.html','admin/account.html','adminpanel.html','webadmin.html', 'webadmin/index.html','webadmin/admin.html','webadmin/login.html','admin/admin_login.html','admin_login.html','panel-administracion/login.html', 'admin/cp.js','cp.js','administrator/index.js','administrator/login.js','nsw/admin/login.js','webadmin/login.js','admin/admin_login.js','admin_login.js', 'administrator/account.js','administrator.js','admin_area/admin.html','pages/admin/admin-login.js','admin/admin-login.js','admin-login.js', 'bb-admin/index.html','bb-admin/login.html','bb-admin/admin.html','admin/home.html','login.js','modelsearch/login.js','moderator.js','moderator/login.js', 'moderator/admin.js','account.js','pages/admin/admin-login.html','admin/admin-login.html','admin-login.html','controlpanel.js','admincontrol.js', 'admin/adminLogin.html','adminLogin.html','admin/adminLogin.html','home.html','rcjakar/admin/login.js','adminarea/index.html','adminarea/admin.html', 'webadmin.js','webadmin/index.js','acceso.js','webadmin/admin.js','admin/controlpanel.html','admin.html','admin/cp.html','cp.html','adminpanel.js','moderator.html', 'administrator/index.html','administrator/login.html','user.html','administrator/account.html','administrator.html','login.html','modelsearch/login.html', 'moderator/login.html','adminarea/login.html','panel-administracion/index.html','panel-administracion/admin.html','modelsearch/index.html','modelsearch/admin.html', 'admincontrol/login.html','adm/index.html','adm.html','moderator/admin.html','user.js','account.html','controlpanel.html','admincontrol.html', 'panel-administracion/login.js','wp-login.js','adminLogin.js','admin/adminLogin.js','home.js','admin.js','adminarea/index.js', 'adminarea/admin.js','adminarea/login.js','panel-administracion/index.js','panel-administracion/admin.js','modelsearch/index.js', 'modelsearch/admin.js','admincontrol/login.js','adm/admloginuser.js','admloginuser.js','admin2.js','admin2/login.js','admin2/index.js','usuarios/login.js', 'adm/index.js','adm.js','affiliate.js','adm_auth.js','memberadmin.js','administratorlogin.js'] 

  cgi = ['admin/','administrator/','admin1/','admin2/','admin3/','admin4/','admin5/','usuarios/','usuario/','administrator/','moderator/','webadmin/','adminarea/','bb-admin/','adminLogin/','admin_area/','panel-administracion/','instadmin/', 'memberadmin/','administratorlogin/','adm/','admin/account.cgi','admin/index.cgi','admin/login.cgi','admin/admin.cgi','admin/account.cgi', 'admin_area/admin.cgi','admin_area/login.cgi','siteadmin/login.cgi','siteadmin/index.cgi','siteadmin/login.html','admin/account.html','admin/index.html','admin/login.html','admin/admin.html', 'admin_area/index.cgi','bb-admin/index.cgi','bb-admin/login.cgi','bb-admin/admin.cgi','admin/home.cgi','admin_area/login.html','admin_area/index.html', 'admin/controlpanel.cgi','admin.cgi','admincp/index.asp','admincp/login.asp','admincp/index.html','admin/account.html','adminpanel.html','webadmin.html', 'webadmin/index.html','webadmin/admin.html','webadmin/login.html','admin/admin_login.html','admin_login.html','panel-administracion/login.html', 'admin/cp.cgi','cp.cgi','administrator/index.cgi','administrator/login.cgi','nsw/admin/login.cgi','webadmin/login.cgi','admin/admin_login.cgi','admin_login.cgi', 'administrator/account.cgi','administrator.cgi','admin_area/admin.html','pages/admin/admin-login.cgi','admin/admin-login.cgi','admin-login.cgi', 'bb-admin/index.html','bb-admin/login.html','bb-admin/admin.html','admin/home.html','login.cgi','modelsearch/login.cgi','moderator.cgi','moderator/login.cgi', 'moderator/admin.cgi','account.cgi','pages/admin/admin-login.html','admin/admin-login.html','admin-login.html','controlpanel.cgi','admincontrol.cgi', 'admin/adminLogin.html','adminLogin.html','admin/adminLogin.html','home.html','rcjakar/admin/login.cgi','adminarea/index.html','adminarea/admin.html', 'webadmin.cgi','webadmin/index.cgi','acceso.cgi','webadmin/admin.cgi','admin/controlpanel.html','admin.html','admin/cp.html','cp.html','adminpanel.cgi','moderator.html', 'administrator/index.html','administrator/login.html','user.html','administrator/account.html','administrator.html','login.html','modelsearch/login.html', 'moderator/login.html','adminarea/login.html','panel-administracion/index.html','panel-administracion/admin.html','modelsearch/index.html','modelsearch/admin.html', 'admincontrol/login.html','adm/index.html','adm.html','moderator/admin.html','user.cgi','account.html','controlpanel.html','admincontrol.html', 'panel-administracion/login.cgi','wp-login.cgi','adminLogin.cgi','admin/adminLogin.cgi','home.cgi','admin.cgi','adminarea/index.cgi', 'adminarea/admin.cgi','adminarea/login.cgi','panel-administracion/index.cgi','panel-administracion/admin.cgi','modelsearch/index.cgi', 'modelsearch/admin.cgi','admincontrol/login.cgi','adm/admloginuser.cgi','admloginuser.cgi','admin2.cgi','admin2/login.cgi','admin2/index.cgi','usuarios/login.cgi', 'adm/index.cgi','adm.cgi','affiliate.cgi','adm_auth.cgi','memberadmin.cgi','administratorlogin.cgi'] 

  brf = ['admin/','administrator/','admin1/','admin2/','admin3/','admin4/','admin5/','usuarios/','usuario/','administrator/','moderator/','webadmin/','adminarea/','bb-admin/','adminLogin/','admin_area/','panel-administracion/','instadmin/', 'memberadmin/','administratorlogin/','adm/','admin/account.brf','admin/index.brf','admin/login.brf','admin/admin.brf','admin/account.brf', 'admin_area/admin.brf','admin_area/login.brf','siteadmin/login.brf','siteadmin/index.brf','siteadmin/login.html','admin/account.html','admin/index.html','admin/login.html','admin/admin.html', 'admin_area/index.brf','bb-admin/index.brf','bb-admin/login.brf','bb-admin/admin.brf','admin/home.brf','admin_area/login.html','admin_area/index.html', 'admin/controlpanel.brf','admin.brf','admincp/index.asp','admincp/login.asp','admincp/index.html','admin/account.html','adminpanel.html','webadmin.html', 'webadmin/index.html','webadmin/admin.html','webadmin/login.html','admin/admin_login.html','admin_login.html','panel-administracion/login.html', 'admin/cp.brf','cp.brf','administrator/index.brf','administrator/login.brf','nsw/admin/login.brf','webadmin/login.brfbrf','admin/admin_login.brf','admin_login.brf', 'administrator/account.brf','administrator.brf','acceso.brf','admin_area/admin.html','pages/admin/admin-login.brf','admin/admin-login.brf','admin-login.brf', 'bb-admin/index.html','bb-admin/login.html','bb-admin/admin.html','admin/home.html','login.brf','modelsearch/login.brf','moderator.brf','moderator/login.brf', 'moderator/admin.brf','account.brf','pages/admin/admin-login.html','admin/admin-login.html','admin-login.html','controlpanel.brf','admincontrol.brf', 'admin/adminLogin.html','adminLogin.html','admin/adminLogin.html','home.html','rcjakar/admin/login.brf','adminarea/index.html','adminarea/admin.html', 'webadmin.brf','webadmin/index.brf','webadmin/admin.brf','admin/controlpanel.html','admin.html','admin/cp.html','cp.html','adminpanel.brf','moderator.html', 'administrator/index.html','administrator/login.html','user.html','administrator/account.html','administrator.html','login.html','modelsearch/login.html', 'moderator/login.html','adminarea/login.html','panel-administracion/index.html','panel-administracion/admin.html','modelsearch/index.html','modelsearch/admin.html', 'admincontrol/login.html','adm/index.html','adm.html','moderator/admin.html','user.brf','account.html','controlpanel.html','admincontrol.html', 'panel-administracion/login.brf','wp-login.brf','adminLogin.brf','admin/adminLogin.brf','home.brf','admin.brf','adminarea/index.brf', 'adminarea/admin.brf','adminarea/login.brf','panel-administracion/index.brf','panel-administracion/admin.brf','modelsearch/index.brf', 'modelsearch/admin.brf','admincontrol/login.brf','adm/admloginuser.brf','admloginuser.brf','admin2.brf','admin2/login.brf','admin2/index.brf','usuarios/login.brf', 'adm/index.brf','adm.brf','affiliate.brf','adm_auth.brf','memberadmin.brf','administratorlogin.brf'] 

  try:
    site = raw_input("Web Site for Scan?: ")
    site = site.replace("http://","")
    print ("\tChecking website " + site + "...")
    conn = httplib.HTTPConnection(site)
    conn.connect()
    print "\t[$] Yes... Server is Online."
  except (httplib.HTTPResponse, socket.error) as Exit:
    raw_input("\t [!] Oops Error occured, Server offline or invalid URL")
    exit()
  print "Enter site source code:"
  print "1 PHP"
  print "2 ASP"
  print "3 CFM"
  print "4 JS"
  print "5 CGI"
  print "6 BRF"
  print "\nPress 1 and 'Enter key' for Select PHP\n"
  code=input("> ") 

  if code==1:
    print("\t [+] Scanning " + site + "...\n\n")
    for admin in php:
      admin = admin.replace("\n","")
      admin = "/" + admin
      host = site + admin
      print ("\t [#] Checking " + host + "...")
      connection = httplib.HTTPConnection(site)
      connection.request("GET",admin)
      response = connection.getresponse()
      var2 = var2 + 1
      if response.status == 200:
        var1 = var1 + 1
        print "%s %s" % ( "\n\n>>>" + host, "Admin page found!")
        raw_input("Press enter to continue scanning.\n")
      elif response.status == 404:
        var2 = var2
      elif response.status == 302:
        print "%s %s" % ("\n>>>" + host, "Possible admin page (302 - Redirect)")
      else:
        print "%s %s %s" % (host, " Interesting response:", response.status)
      connection.close()
    print("\n\nCompleted \n")
    print var1, " Admin pages found"
    print var2, " total pages scanned"
    raw_input("[/] The Game Over; Press Enter to Exit") 

  if code==2:
    print("\t [+] Scanning " + site + "...\n\n")
    for admin in asp:
      admin = admin.replace("\n","")
      admin = "/" + admin
      host = site + admin
      print ("\t [#] Checking " + host + "...")
      connection = httplib.HTTPConnection(site)
      connection.request("GET",admin)
      response = connection.getresponse()
      var2 = var2 + 1
      if response.status == 200:
        var1 = var1 + 1
        print "%s %s" % ( "\n\n>>>" + host, "Admin page found!")
        raw_input("Press enter to continue scanning.\n")
      elif response.status == 404:
        var2 = var2
      elif response.status == 302:
        print "%s %s" % ("\n>>>" + host, "Possible admin page (302 - Redirect)")
      else:
        print "%s %s %s" % (host, " Interesting response:", response.status)
      connection.close()
    print("\n\nCompleted \n")
    print var1, " Admin pages found"
    print var2, " total pages scanned"
    raw_input("The Game Over; Press Enter to Exit") 

  if code==3:
    print("\t [+] Scanning " + site + "...\n\n")
    for admin in cfm:
      admin = admin.replace("\n","")
      admin = "/" + admin
      host = site + admin
      print ("\t [#] Checking " + host + "...")
      connection = httplib.HTTPConnection(site)
      connection.request("GET",admin)
      response = connection.getresponse()
      var2 = var2 + 1
      if response.status == 200:
        var1 = var1 + 1
        print "%s %s" % ( "\n\n>>>" + host, "Admin page found!")
        raw_input("Press enter to continue scanning.\n")
      elif response.status == 404:
        var2 = var2
      elif response.status == 302:
        print "%s %s" % ("\n>>>" + host, "Possible admin page (302 - Redirect)")
      else:
        print "%s %s %s" % (host, " Interesting response:", response.status)
      connection.close()
    print("\n\nCompleted \n")
    print var1, " Admin pages found"
    print var2, " total pages scanned"
    raw_input("The Game Over; Press Enter to Exit") 

  if code==4:
    print("\t [+] Scanning " + site + "...\n\n")
    for admin in js:
      admin = admin.replace("\n","")
      admin = "/" + admin
      host = site + admin
      print ("\t [#] Checking " + host + "...")
      connection = httplib.HTTPConnection(site)
      connection.request("GET",admin)
      response = connection.getresponse()
      var2 = var2 + 1
      if response.status == 200:
        var1 = var1 + 1
        print "%s %s" % ( "\n\n>>>" + host, "Admin page found!")
        raw_input("Press enter to continue scanning.\n")
      elif response.status == 404:
        var2 = var2
      elif response.status == 302:
        print "%s %s" % ("\n>>>" + host, "Possible admin page (302 - Redirect)")
      else:
        print "%s %s %s" % (host, " Interesting response:", response.status)
      connection.close()
    print("\n\nCompleted \n")
    print var1, " Admin pages found"
    print var2, " total pages scanned"
    raw_input("The Game Over; Press Enter to Exit") 

  if code==5:
    print("\t [+] Scanning " + site + "...\n\n")
    for admin in cgi:
      admin = admin.replace("\n","")
      admin = "/" + admin
      host = site + admin
      print ("\t [#] Checking " + host + "...")
      connection = httplib.HTTPConnection(site)
      connection.request("GET",admin)
      response = connection.getresponse()
      var2 = var2 + 1
      if response.status == 200:
        var1 = var1 + 1
        print "%s %s" % ( "\n\n>>>" + host, "Admin page found!")
        raw_input("Press enter to continue scanning.\n")
      elif response.status == 404:
        var2 = var2
      elif response.status == 302:
        print "%s %s" % ("\n>>>" + host, "Possible admin page (302 - Redirect)")
      else:
        print "%s %s %s" % (host, " Interesting response:", response.status)
      connection.close()
    print("\n\nCompleted \n")
    print var1, " Admin pages found"
    print var2, " total pages scanned"
    raw_input("The Game Over; Press Enter to Exit") 

  if code==6:
    print("\t [+] Scanning " + site + "...\n\n")
    for admin in brf:
      admin = admin.replace("\n","")
      admin = "/" + admin
      host = site + admin
      print ("\t [#] Checking " + host + "...")
      connection = httplib.HTTPConnection(site)
      connection.request("GET",admin)
      response = connection.getresponse()
      var2 = var2 + 1
      if response.status == 200:
        var1 = var1 + 1
        print "%s %s" % ( "\n\n>>>" + host, "Admin page found!")
        raw_input("Press enter to continue scanning.\n")
      elif response.status == 404:
        var2 = var2
      elif response.status == 302:
        print "%s %s" % ("\n>>>" + host, "Possible admin page (302 - Redirect)")
      else:
        print "%s %s %s" % (host, " Interesting response:", response.status)
      connection.close()
    print("\n\nCompleted \n")
    print var1, " Admin pages found"
    print var2, " total pages scanned"
    raw_input("The Game Over; Press Enter to Exit") except (httplib.HTTPResponse, socket.error):
  print "\n\t[!] Session Cancelled; Error occured. Check internet settings" except (KeyboardInterrupt, SystemExit):
  print "\n\t[!] Session cancelled"
(0)

相关推荐

  • python中的hashlib和base64加密模块使用实例

    看到好几位博主通过对模块的各个击破学习python,我也效法一下,本篇说一下python中加密涉及到的模块. hashlib hashlib模块支持的加密算法有md5 sha1 sha224 sha256 sha384 sha512(加密原理请参考此处),使用起来也很简单. 以md5加密为例,有两种方法: 一. 追加模式 代码示例: 复制代码 代码如下: import hashlib #引入hashlib模块    mm = hashlib.md5() #创建一个md5对象  mm.update

  • python3使用tkinter实现ui界面简单实例

    复制代码 代码如下: import timeimport tkinter as tk class Window:    def __init__(self, title='nms', width=300, height=120, staFunc=bool, stoFunc=bool):        self.w = width        self.h = height        self.stat = True        self.staFunc = staFunc       

  • python爬虫入门教程之糗百图片爬虫代码分享

    学习python少不了写爬虫,不仅能以点带面地学习.练习使用python,爬虫本身也是有用且有趣的,大量重复性的下载.统计工作完全可以写一个爬虫程序完成. 用python写爬虫需要python的基础知识.涉及网络的几个模块.正则表达式.文件操作等知识.昨天在网上学习了一下,写了一个爬虫自动下载「糗事百科」里面的图片.源代码如下: 复制代码 代码如下: # -*- coding: utf-8 -*- # 上面那句让代码里支持中文 #---------------------------------

  • Python Tkinter简单布局实例教程

    本文实例展示了Python Tkinter实现简单布局的方法,示例中备有较为详尽的注释,便于读者理解.分享给大家供大家参考之用.具体如下: # -*- coding: utf-8 -*- from Tkinter import * root = Tk() # 80x80代表了初始化时主窗口的大小,0,0代表了初始化时窗口所在的位置 root.geometry('80x80+10+10') # 填充方向 ''' Label(root, text = 'l1', bg = 'red').pack(f

  • Python抓取京东图书评论数据

    京东图书评论有非常丰富的信息,这里面就包含了购买日期.书名.作者.好评.中评.差评等等.以购买日期为例,使用Python + Mysql的搭配进行实现,程序不大,才100行.相关的解释我都在程序里加注了: from selenium import webdriver from bs4 import BeautifulSoup import re import win32com.client import threading,time import MySQLdb def mydebug():  

  • python3.3使用tkinter开发猜数字游戏示例

    利用这个小游戏可以学习一下ython3.3中tkinter的使用方法 复制代码 代码如下: # -*- coding: utf-8 -*-import tkinter as tkimport sysimport randomimport re number = random.randint(0,1024)running = Truenum = 0nmaxn = 1024nminn = 0 def eBtnClose(event):    root.destroy() def eBtnGuess(

  • python的tkinter布局之简单的聊天窗口实现方法

    本文实例展示了一个python的tkinter布局的简单聊天窗口.分享给大家供大家参考之用.具体方法如下: 该实例展示的是一个简单的聊天窗口,可以实现下方输入聊天内容,点击发送,可以增加到上方聊天记录列表中.现在只是"单机"版. 右侧预留了空位可以放点儿其它东西.感兴趣的读者可以进一步做成socket双方互聊. 以下是功能代码部分: from Tkinter import * import datetime import time root = Tk() root.title(unic

  • Python升级提示Tkinter模块找不到的解决方法

    一.安装tkinter 在Linux中python默认是不安装Tkinter模块, 复制代码 代码如下: [root@li250-193 ~]# python Python 2.6.6 (r266:84292, Feb 22 2013, 00:00:18) [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2 Type "help", "copyright", "credits" or "li

  • Python Tkinter基础控件用法

    本文实例展示了Python Tkinter基础控件的用法,分享给大家供大家参考之用.具体方法如下: # -*- coding: utf-8 -*- from Tkinter import * def btn_click(): b2['text'] = 'clicked' evalue = e.get() print 'btn Click and Entry value is %s' % evalue def btn_click_bind(event): print 'enter b2' def

  • python批量同步web服务器代码核心程序

    #!/usr/bin/env python #coding:utf8 import os,sys import md5,tab from mysql_co.my_db import set_mysql from ssh_co.ssh_connect import sshd from ssh_co.cfg.config import ssh_message,item_path from file import findfile def my_mysql(): db_file={} my_conne

  • python之yield表达式学习

    python中有一个略微奇怪的表达式叫yield expression,本文就来探究一下这是个什么东西.一步一步来. iterable 复制代码 代码如下: mylist = [1,2,3] for item in mylist:     print str(item) mylist是一个列表(list),我们可以逐条取出每一个item,这个过程叫做iteration.像list这样可以用"for-in-"依次遍历的对象被称为iterable,其他的iterable还有string.t

  • python中的五种异常处理机制介绍

    从几年前开始学习编程直到现在,一直对程序中的异常处理怀有恐惧和排斥心理.之所以这样,是因为不了解.这次攻python,首先把自己最畏惧和最不熟悉的几块内容列出来,里面就有「异常处理」这一项. <Dive into Python>并没有专门介绍异常处理,只是例子中用到的时候略微说明了一下.今天下载<Learn Python>,直接进异常处理这块.这一部分有四章,第一章讲解异常处理的一般使用方法,后面的章节深入地讨论其机制.我目前只看了第一章,先学会用,以后有必要的时候再扩展阅读. p

  • python爬虫入门教程之点点美女图片爬虫代码分享

    继续鼓捣爬虫,今天贴出一个代码,爬取点点网「美女」标签下的图片,原图. # -*- coding: utf-8 -*- #--------------------------------------- # 程序:点点美女图片爬虫 # 版本:0.2 # 作者:zippera # 日期:2013-07-26 # 语言:Python 2.7 # 说明:能设置下载的页数 #--------------------------------------- import urllib2 import urll

随机推荐