Advertisement
Guest User

Untitled

a guest
May 1st, 2017
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.89 KB | None | 0 0
  1. import requests, re, random, time, win_inet_pton, os
  2. import tempmail
  3. from stem import Signal
  4. from stem.control import Controller
  5.  
  6. wordList = requests.get('http://splasho.com/upgoer5/phpspellcheck/dictionaries/1000.dicin').content.replace('\'', '').splitlines()
  7.  
  8. def newIdentity():
  9. proxy = 'socks5://127.0.0.1:9150'
  10. with Controller.from_port(port = 9151) as controller:
  11. controller.authenticate()
  12. controller.signal(Signal.NEWNYM)
  13. return {'http': proxy, 'https': proxy}
  14.  
  15. proxy = newIdentity()
  16.  
  17. def generateString(length = 20):
  18. ustr = ''
  19. for i in range(1, length):
  20. word = random.randint(3, len(wordList) - 2)
  21. word = wordList[word]
  22. ustr = ustr + word
  23. return ustr[:length].lower()
  24.  
  25. def generateDate():
  26. return str(random.randint(1985, 1999)) + '-12-12'
  27.  
  28. def validateUsername(username):
  29. validateUrl = 'https://m.roblox.com/Account/ValidateUserNameForSignUp?UserName='
  30. validateRequest = requests.get(validateUrl + username)
  31. if ('true' in validateRequest.content):
  32. return True
  33. else:
  34. return False
  35.  
  36. def verifyAccount(session, password):
  37. tm = tempmail.TempMail()
  38. address = tm.get_email_address()
  39. maxAttempts = 30
  40. currentAttempts = 0
  41. xsrfRequest = session.get('https://www.roblox.com/my/account#!/info', proxies = proxy)
  42. xsrfFind = re.search('setToken\(\'(.+)\'\);', xsrfRequest.content)
  43. if (xsrfFind != None):
  44. xsrf = xsrfFind.group(1)
  45. verifyRequest = session.post('https://www.roblox.com/account/changeemail', data = {
  46. 'emailAddress': address,
  47. 'password': password
  48. }, headers = {
  49. 'X-CSRF-TOKEN': xsrf
  50. }, proxies = proxy)
  51. if ('Message' in verifyRequest.content) and (verifyRequest.json()['Message'] == 'Email Added'):
  52. # Confirmation email sent.
  53. while (maxAttempts > currentAttempts):
  54. currentAttempts += 1
  55. box = tm.get_mailbox(address)
  56. linkAttempt = re.search('Ticket=(....................................)', str(box))
  57. if (linkAttempt != None):
  58. currentAttempts = (maxAttempts + 10)
  59. ticketUrl = 'http://www.roblox.com/RobloxVerify.aspx?Mode=emailOnly&Ticket=' + linkAttempt.group(1)
  60. verifyyRequest = session.get(ticketUrl, proxies = proxy)
  61. if ('has been' in verifyyRequest.content.lower()):
  62. return (True)
  63. time.sleep(2)
  64. raw_input()
  65. return (False)
  66.  
  67. def accountCallback(session, password):
  68. return True
  69.  
  70. def register(username, password, birthdate, gender, proxies = {}):
  71. imageCacheUrl = 'https://m.roblox.com/timg/rbx'
  72. registerUrl = 'https://m.roblox.com/Account/SignUp'
  73. accountSession = requests.Session()
  74. preloadRequest = accountSession.get(registerUrl, proxies=proxies)
  75. accountSession.get(imageCacheUrl, proxies=proxies)
  76. requestVerificationToken = re.search(
  77. 'value=\"(.*)\" /></form>',
  78. preloadRequest.content
  79. )
  80. if (requestVerificationToken != None):
  81. registerData = {
  82. 'UserName': username,
  83. 'Password': password,
  84. 'ConfirmPassword': password,
  85. 'Gender': gender,
  86. 'Birthday': birthdate,
  87. '__RequestVerificationToken': requestVerificationToken.group(1)
  88. }
  89. registerRequest = accountSession.post(registerUrl, data=registerData, proxies=proxies)
  90. if ('Update Status' in registerRequest.content):
  91. if (accountCallback(accountSession, password) == True):
  92. verifyAccount(accountCallback, password)
  93. return (True)
  94. return (False)
  95.  
  96.  
  97. while True:
  98. try:
  99. username = ''
  100. while username == '':
  101. strr = generateString()
  102. if (validateUsername(strr) == True):
  103. username = strr
  104. password = generateString() + '123'
  105. registerAttempt = register(username, password, generateDate(), random.randint(2, 3), proxy)
  106. if registerAttempt == True:
  107. print(username + ':' + password)
  108. verifyAccount(
  109. fname = 'Accounts\\' + username + '.rbxacc'
  110. file = open(fname, 'w+')
  111. file.write((username + ':' + password))
  112. file.close()
  113. else:
  114. print 'Captcha detected, switching identity.'
  115. proxy = newIdentity()
  116. except:
  117. pass
  118. raw_input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement