Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2017
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.53 KB | None | 0 0
  1.  
  2.  
  3. # _*_ coding:ascii _*_
  4.  
  5. from termcolor import colored as c
  6. from getpass import getpass
  7. from requests import get, post, Session as session
  8. from json import loads
  9. import os
  10. import re
  11. import imghdr
  12. import requests
  13. #
  14. class account:
  15. username = '' # Your account username.
  16. password = '' # Your account password.
  17. group = '' # Leave this at blank if you don't want to upload to group.
  18. price = 5 # Leave this at 0 if you don't want to sell.
  19. desc = '''
  20. 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
  21. '''# Default description.
  22. #
  23. d_session = session()
  24. d_title = 'Shirter V1.1'
  25. d_title_2 = 'by '
  26. d_creator = '@owlv3rm'
  27. d_color_1 = 'green'
  28. d_color_2 = 'white'
  29. #
  30. requests.packages.urllib3.disable_warnings()
  31. #
  32. def login(u = account.username, p = account.password, s = d_session):
  33. captcha_message = 'Please fill out the CAPTCHA correctly'
  34. success_message = 'Update Status'
  35. bad_message = 'Wrong username or password'
  36. twofa_message = 'Please enter the Identification code.'
  37. r = s.post('https://m.roblox.com/login', verify = False, data = {'UserName':u,'Password':p})
  38. if captcha_message and 'keep in touch' in r.content:
  39. return 'CAPTCHA'
  40. elif success_message in r.content:
  41. return 'SUCCESS'
  42. elif twofa_message in r.content:
  43. return '2FA'
  44. elif bad_message and 'keep in touch' in r.content:
  45. return 'BAD'
  46. def clear():
  47. if os.name == 'nt' or os.name == 'dos':
  48. os.system('cls')
  49. elif os.name == 'linux' or os.name == 'osx' or os.name == 'posix':
  50. os.system('clear')
  51. else:
  52. print ('\n' * 120)
  53. def title():
  54. print c(d_title, d_color_1).center(50)
  55. print (c(d_title_2, d_color_1) + c(d_creator, d_color_2)).center(58)
  56. print ''
  57. def getids(z, ses=d_session):
  58. # print z
  59. aa = []
  60. for i in range(int(z[0]), int(z[1])):
  61. 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
  62. for asset in a():
  63. aa.append(str(asset['AssetId']))
  64. return aa
  65. def upload(data, name, typeid, ses = d_session):
  66. datatype = imghdr.what(None, data)
  67. rvt = re.findall('Token.+value?=?\"(.+)\"', ses.get('https://www.roblox.com/build/upload').content)[0]
  68. d=ses.post('https://www.roblox.com/build/upload', data = {
  69. '__RequestVerificationToken': rvt,
  70. 'assetTypeId': typeid,
  71. 'isOggUploadEnabled': 'True',
  72. 'isTgaUploadEnabled': 'True',
  73. 'groupId': account.group,
  74. 'onVerificationPage': 'False',
  75. 'name': name
  76. }, files = {
  77. 'file': ('template.' + datatype, data, 'image/' + datatype)
  78. }, verify = False).content
  79. return re.search('\.com/.+-.+id=(.+)\".+target', d).group(1)
  80. def updatePrice(aid, price, name, ses = d_session):
  81. url = 'https://www.roblox.com/my/Item.aspx?id='+aid
  82. req1 = ses.get(url).content
  83. # print url
  84. s = '$'
  85. data = {
  86. '__EVENTTARGET': 'ctl00$cphRoblox$SubmitButtonTop',
  87. '__EVENTARGUMENT': '',
  88. '__VIEWSTATE': re.search('__VIEWSTATE\" value=\"(.+)\" />', req1).group(1),
  89. '__VIEWSTATEGENERATOR': re.search('__VIEWSTATEGENERATOR\" value=\"(.+)\" />', req1).group(1),
  90. '__PREVIOUSPAGE': re.search('__PREVIOUSPAGE\" value=\"(.+)\" />', req1).group(1),
  91. '__EVENTVALIDATION': re.search('__EVENTVALIDATION\" value=\"(.+)\" />', req1).group(1),
  92. 'ctl00' + s + 'cphRoblox' + s + 'NameTextBox': name,
  93. 'ctl00' + s + 'cphRoblox' + s + 'DescriptionTextBox': account.desc,
  94. 'ctl00' + s + 'cphRoblox' + s + 'SellThisItemCheckBox': 'on',
  95. 'ctl00' + s + 'cphRoblox' + s + 'SellForRobux': 'on',
  96. 'ctl00' + s + 'cphRoblox' + s + 'RobuxPrice': price,
  97. 'ctl00' + s + 'cphRoblox' + s + 'EnableCommentsCheckBox': 'on',
  98. 'GenreButtons2': '1',
  99. 'ctl00' + s + 'cphRoblox' + s + 'actualGenreSelection': '5'
  100. }
  101. #print re.findall('value=\"(.+)\"', req1)
  102. return ses.post(url, data = data).url
  103. #
  104. def main():
  105. clear()
  106. title()
  107. if account.username == '' or account.password == '':
  108. print c('Username or password not set, please enter account info below.', 'yellow')
  109. account.username = raw_input('Username: ')
  110. account.password = getpass('Password: ')
  111. else:
  112. print c('Account details already set...', 'green')
  113. print c('Logging into account...', 'green')
  114. attempt = login()
  115. if attempt == 'CAPTCHA':
  116. print c('Captcha detected, please fill it out in the link below and press enter:', 'red')
  117. print 'https://www.roblox.com/Login/iFrameLogin.aspx'
  118. raw_input()
  119. main()
  120. elif attempt == 'BAD':
  121. print c('Bad username or password, press enter to try again', 'red')
  122. account.username = ''
  123. account.password = ''
  124. raw_input()
  125. main()
  126. elif attempt == '2FA':
  127. print c('It looks like you have enabled Two Factor Authentication on your account, please disable it and press enter.', 'yellow')
  128. raw_input()
  129. main()
  130. elif attempt == 'SUCCESS':
  131. def main2():
  132. clear()
  133. title()
  134. print c('Enter asset ID\'s to copy seperated by commas:', 'yellow')
  135. ids = raw_input()
  136. if ids[:4] != 'page':
  137. ids = ids.split(',')
  138. else:
  139. ids = getids(ids[5:].split(':'))
  140. for aid in ids:
  141. ainfo = re.sub(r'[^\x00-\x7f]', r'', d_session.get('https://api.roblox.com/Marketplace/ProductInfo?assetId=' + aid, verify=False).content)
  142. ainfo = loads(ainfo)
  143. aname = ainfo['Name']
  144. atid = ainfo['AssetTypeId']
  145. print c('Copying \'' + c(ainfo['Name'], 'white') + c('\' created by ', 'green') + c(ainfo['Creator']['Name'], 'white') + c('.', 'green'), 'green')
  146. tid = re.findall('\?id=(.+)</url', d_session.get('https://www.roblox.com/asset?id='+aid, headers={'User-Agent':'Roblox/WinInet'}, verify=False).content)[0]
  147. templatereq = d_session.get('https://www.roblox.com/asset?id=' + tid, stream=True, verify=False, headers={'User-Agent':'Roblox/WinInet'})
  148. template = templatereq.content
  149. abc = upload(template, aname, atid)
  150. def atm():
  151. try:
  152. updatePrice(abc, account.price, aname)
  153. except:
  154. pass
  155. # print'a'
  156. atm()
  157. print c('Finished, please press enter.', 'green')
  158. raw_input()
  159. main2()
  160. main2()
  161. main()[/code]
  162. If you're gonna use just leave a vouch
  163. [/quote]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement