Advertisement
Guest User

Untitled

a guest
Jan 27th, 2017
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.78 KB | None | 0 0
  1. # Shirter
  2. # The amount of time this actually took me is unbelievable,
  3. # this entire script was written on a phone and after about
  4. # the 50th line there was a 0.1s delay between each letter.
  5. # Anyways, enjoy.
  6.  
  7. # _*_ coding:ascii _*_
  8.  
  9. from termcolor import colored as c
  10. from getpass import getpass
  11. from requests import get, post, Session as session
  12. from json import loads
  13. import os
  14. import re
  15. import imghdr
  16. import requests
  17. import time
  18. #
  19. class account:
  20. username = '' # Your account username.
  21. password = '' # Your account password.
  22. group = '' # Leave this at blank if you don't want to upload to group.
  23. price = '5' # Leave this at 0 if you don't want to sell.
  24. desc = '''
  25. telamon builderman shirt t-shirt pwn pwnage pwned epic cool jean clothes muscle cloak armor hoodie jacket free DC Camo Camouflague Camouflage camoflage American Eagle admin vip funny awesome fun cheap best selling paintball skate camo army general private christmas elf elves presents pvt gun ninja armour halloween summer spring girl man boy woman winter fall autumn dead killed own ownage owned 1337 leet SWAT black green yellow orange purple blue red white toon stealth assassin default 2006 2007 2008 2009 2010 2011 2012 tix tickets robux suit tux tuxedo top F.E.A.R. FEAR RAT R.A.T. UCR U.C.R. uniform fusion olympics x-101st jesus christ god batman spiderman superman hulk iron man indiana jones wii jersey soccer football basketball baseball pirate soldier future futuristic free cool tight dog dawg animals formal peace love chest hair arm hair back hair and happiness hate h8
  26. '''# Default description.
  27. #
  28. d_session = session()
  29. d_title = 'Shirter V1.1'
  30. d_title_2 = 'by '
  31. d_creator = '@DominusTrexV2'
  32. d_color_1 = 'green'
  33. d_color_2 = 'white'
  34. #
  35. requests.packages.urllib3.disable_warnings()
  36. #
  37. def login(u = account.username, p = account.password, s = d_session):
  38. captcha_message = 'Please fill out the CAPTCHA correctly'
  39. success_message = 'Update Status'
  40. bad_message = 'Wrong username or password'
  41. twofa_message = 'Please enter the Identification code.'
  42. r = s.post('https://m.roblox.com/login', verify = False, data = {'UserName':u,'Password':p})
  43. if captcha_message and 'keep in touch' in r.content:
  44. return 'CAPTCHA'
  45. elif success_message in r.content:
  46. return 'SUCCESS'
  47. elif twofa_message in r.content:
  48. return '2FA'
  49. elif bad_message and 'keep in touch' in r.content:
  50. return 'BAD'
  51. def clear():
  52. if os.name == 'nt' or os.name == 'dos':
  53. os.system('cls')
  54. elif os.name == 'linux' or os.name == 'osx' or os.name == 'posix':
  55. os.system('clear')
  56. else:
  57. print ('\n' * 120)
  58. def title():
  59. print c(d_title, d_color_1).center(50)
  60. print (c(d_title_2, d_color_1) + c(d_creator, d_color_2)).center(58)
  61. print ''
  62. def getids(z, ses=d_session):
  63. # print z
  64. aa = []
  65. for i in range(int(z[0]), int(z[1])):
  66. a=ses.get('http://search.roblox.com/catalog/json?CatalogContext=1&Subcategory=12&SortType=2&SortAggregation=5&LegendExpanded=true&Category=3&PageNumber=' + str(i)).json
  67. for asset in a():
  68. aa.append(str(asset['AssetId']))
  69. return aa
  70. def upload(data, name, typeid, ses = d_session):
  71. datatype = imghdr.what(None, data)
  72. rvt = re.findall('Token.+value?=?\"(.+)\"', ses.get('https://www.roblox.com/build/upload').content)[0]
  73. d=ses.post('https://www.roblox.com/build/upload', data = {
  74. '__RequestVerificationToken': rvt,
  75. 'assetTypeId': typeid,
  76. 'isOggUploadEnabled': 'True',
  77. 'isTgaUploadEnabled': 'True',
  78. 'groupId': account.group,
  79. 'onVerificationPage': 'False',
  80. 'name': name
  81. }, files = {
  82. 'file': ('template.' + datatype, data, 'image/' + datatype)
  83. }, verify = False).content
  84. # return re.search('\.com/.+-.+id=(.+)\".+target', d).group(1)
  85. return re.search('/catalog/(.*)/', d).group(1)
  86. def updatePrice(aid, price, name, ses = d_session):
  87. url = 'https://www.roblox.com/my/Item.aspx?id='+aid
  88. req1 = ses.get(url).content
  89. # print url
  90. s = '$'
  91. data = {
  92. '__EVENTTARGET': 'ctl00$cphRoblox$SubmitButtonTop',
  93. '__EVENTARGUMENT': '',
  94. '__VIEWSTATE': re.search('__VIEWSTATE\" value=\"(.+)\" />', req1).group(1),
  95. '__VIEWSTATEGENERATOR': re.search('__VIEWSTATEGENERATOR\" value=\"(.+)\" />', req1).group(1),
  96. '__PREVIOUSPAGE': re.search('__PREVIOUSPAGE\" value=\"(.+)\" />', req1).group(1),
  97. '__EVENTVALIDATION': re.search('__EVENTVALIDATION\" value=\"(.+)\" />', req1).group(1),
  98. 'ctl00' + s + 'cphRoblox' + s + 'NameTextBox': name,
  99. 'ctl00' + s + 'cphRoblox' + s + 'DescriptionTextBox': account.desc,
  100. 'ctl00' + s + 'cphRoblox' + s + 'SellThisItemCheckBox': 'on',
  101. 'ctl00' + s + 'cphRoblox' + s + 'SellForRobux': 'on',
  102. 'ctl00' + s + 'cphRoblox' + s + 'RobuxPrice': price,
  103. 'ctl00' + s + 'cphRoblox' + s + 'EnableCommentsCheckBox': 'on',
  104. 'GenreButtons2': '1',
  105. 'ctl00' + s + 'cphRoblox' + s + 'actualGenreSelection': '5'
  106. }
  107. #print re.findall('value=\"(.+)\"', req1)
  108. return ses.post(url, data = data).url
  109. #
  110. def main():
  111. clear()
  112. title()
  113. if account.username == '' or account.password == '':
  114. print c('Username or password not set, please enter account info below.', 'yellow')
  115. account.username = raw_input('Username: ')
  116. account.password = getpass('Password: ')
  117. else:
  118. print c('Account details already set...', 'green')
  119. print c('Logging into account...', 'green')
  120. attempt = login()
  121. if attempt == 'CAPTCHA':
  122. print c('Captcha detected, please fill it out in the link below and press enter:', 'red')
  123. print 'https://www.roblox.com/Login/iFrameLogin.aspx'
  124. raw_input()
  125. main()
  126. elif attempt == 'BAD':
  127. print c('Bad username or password, press enter to try again', 'red')
  128. account.username = ''
  129. account.password = ''
  130. raw_input()
  131. main()
  132. elif attempt == '2FA':
  133. print c('It looks like you have enabled Two Factor Authentication on your account, please disable it and press enter.', 'yellow')
  134. raw_input()
  135. main()
  136. elif attempt == 'SUCCESS':
  137. def main2():
  138. clear()
  139. title()
  140. print c('Enter asset ID\'s to copy seperated by commas:', 'yellow')
  141. ids = raw_input()
  142. if ids[:4] != 'page':
  143. ids = ids.split(',')
  144. else:
  145. ids = getids(ids[5:].split(':'))
  146. for aid in ids:
  147. ainfo = re.sub(r'[^\x00-\x7f]', r'', d_session.get('https://api.roblox.com/Marketplace/ProductInfo?assetId=' + aid, verify=False).content)
  148. ainfo = loads(ainfo)
  149. aname = ainfo['Name']
  150. atid = ainfo['AssetTypeId']
  151. print c('Copying \'' + c(ainfo['Name'], 'white') + c('\' created by ', 'green') + c(ainfo['Creator']['Name'], 'white') + c('.', 'green'), 'green')
  152. time.sleep(0)
  153. tid = re.findall('\?id=(.+)</url', d_session.get('https://www.roblox.com/asset?id='+aid, headers={'User-Agent':'Roblox/WinInet'}, verify=False).content)[0]
  154. templatereq = d_session.get('https://www.roblox.com/asset?id=' + tid, stream=True, verify=False, headers={'User-Agent':'Roblox/WinInet'})
  155. template = templatereq.content
  156. abc = upload(template, aname, atid)
  157. def atm():
  158. try:
  159. updatePrice(abc, account.price, aname)
  160. except:
  161. pass
  162. # print'a'
  163. atm()
  164. print c('Finished, please press enter.', 'green')
  165. raw_input()
  166. main2()
  167. main2()
  168. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement