Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2016
480
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.37 KB | None | 0 0
  1. # _*_ coding:ascii _*_
  2.  
  3. from termcolor import colored as c
  4. from getpass import getpass
  5. from requests import get, post, Session as session
  6. from json import loads
  7. import os
  8. import re
  9. import subprocess
  10. import imghdr
  11. import requests
  12. #
  13. class account:
  14. username = 'V_ext' # Your account username.
  15. password = 'blankbot' # Your account password.
  16. group = '' # Leave this at blank if you don't want to upload to group.
  17. price = 0 # Leave this at 0 if you don't want to sell.
  18. #
  19. d_session = session()
  20. d_title = 'Shirter V1'
  21. d_title_2 = 'by '
  22. d_creator = '@DominusTrexV2'
  23. d_color_1 = 'green'
  24. d_color_2 = 'white'
  25. #
  26. requests.packages.urllib3.disable_warnings()
  27. #
  28. def login(u = account.username, p = account.password, s = d_session):
  29. captcha_message = 'Please fill out the CAPTCHA correctly'
  30. success_message = 'Update Status'
  31. bad_message = 'Wrong username or password'
  32. twofa_message = 'Please enter the Identification code.'
  33. r = s.post('https://m.roblox.com/login', verify = False, data = {'UserName':u,'Password':p})
  34. if captcha_message and 'keep in touch' in r.content:
  35. return 'CAPTCHA'
  36. elif success_message in r.content:
  37. return 'SUCCESS'
  38. elif twofa_message in r.content:
  39. return '2FA'
  40. elif bad_message and 'keep in touch' in r.content:
  41. return 'BAD'
  42. def clear():
  43. if os.name == 'nt' or os.name == 'dos':
  44. os.system('cls')
  45. elif os.name == 'linux' or os.name == 'osx' or os.name == 'posix':
  46. os.system('clear')
  47. else:
  48. print ('\n' * 120)
  49. def title():
  50. print c(d_title, d_color_1).center(50)
  51. print (c(d_title_2, d_color_1) + c(d_creator, d_color_2)).center(58)
  52. print ''
  53. def upload(data, name, typeid, ses = d_session):
  54. datatype = imghdr.what(None, data)
  55. rvt = re.findall('Token.+value?=?\"(.+)\"', ses.get('https://www.roblox.com/build/upload').content)[0]
  56. ses.post('https://www.roblox.com/build/upload', data = {
  57. '__RequestVerificationToken': rvt,
  58. 'assetTypeId': typeid,
  59. 'isOggUploadEnabled': 'True',
  60. 'isTgaUploadEnabled': 'True',
  61. 'groupId': account.group,
  62. 'onVerificationPage': 'False',
  63. 'name': name
  64. }, files = {
  65. 'file': ('template.' + datatype, data, 'image/' + datatype)
  66. }, verify = False)
  67. #
  68. def main():
  69. clear()
  70. title()
  71. if account.username == '' or account.password == '':
  72. print c('Username or password not set, please enter account info below.', 'yellow')
  73. account.username = raw_input('Username: ')
  74. account.password = getpass('Password: ')
  75. else:
  76. print c('Account details already set...', 'green')
  77. print c('Logging into account...', 'green')
  78. attempt = login()
  79. if attempt == 'CAPTCHA':
  80. print c('Captcha detected, please fill it out in the link below and press enter:', 'red')
  81. print 'https://www.roblox.com/Login/iFrameLogin.aspx'
  82. raw_input()
  83. main()
  84. elif attempt == 'BAD':
  85. print c('Bad username or password, press enter to try again', 'red')
  86. account.username = ''
  87. account.password = ''
  88. raw_input()
  89. main()
  90. elif attempt == '2FA':
  91. print c('It looks like you have enabled Two Factor Authentication on your account, please disable it and press enter.', 'yellow')
  92. raw_input()
  93. main()
  94. elif attempt == 'SUCCESS':
  95. def main2():
  96. clear()
  97. title()
  98. print c('Enter asset ID\'s to copy seperated by commas:', 'yellow')
  99. ids = raw_input().split(',')
  100. for aid in ids:
  101. ainfo = re.sub(r'[^\x00-\x7f]', r'', d_session.get('https://api.roblox.com/Marketplace/ProductInfo?assetId=' + aid, verify=False).content)
  102. ainfo = loads(ainfo)
  103. aname = ainfo['Name']
  104. atid = ainfo['AssetTypeId']
  105. print c('Copying \'' + c(ainfo['Name'], 'white') + c('\' created by ', 'green') + c(ainfo['Creator']['Name'], 'white') + c('.', 'green'), 'green')
  106. tid = re.findall('\?id=(.+)</url', d_session.get('https://www.roblox.com/asset?id='+aid, verify=False).content)[0]
  107. templatereq = d_session.get('https://www.roblox.com/asset?id=' + tid, stream=True, verify=False)
  108. template = templatereq.content
  109. upload(template, aname, atid)
  110. main2()
  111. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement