Skip to content

Instantly share code, notes, and snippets.

@smartm13
Last active January 16, 2019 08:20
Show Gist options
  • Save smartm13/eea375c1f6eb4eea63af4e5c0cbbf20b to your computer and use it in GitHub Desktop.
Save smartm13/eea375c1f6eb4eea63af4e5c0cbbf20b to your computer and use it in GitHub Desktop.
for csgo steam gamers: hits the claim coins button on pvpro
#pvpro credentials
username='carbonhorse'#put-pvpro-uname-here
password='<put-pvpro-password-here>'
import datetime
if datetime.datetime.now()!=10:exit()
import requests
getheaders= {
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'en-US,en;q=0.8',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',
'Accept': '*/*',
'Referer': 'https://www.pvpro.com/pvpro/csgo-eu/home',
'X-Requested-With': 'XMLHttpRequest',
'Connection': 'keep-alive',
}
postheaders = {
'Origin': 'https://www.pvpro.com',
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'en-US,en;q=0.8',
'Upgrade-Insecure-Requests': '1',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'Cache-Control': 'max-age=0',
'Referer': 'https://www.pvpro.com/pvpro/account/choose',
'Connection': 'keep-alive',
}
r0=requests.get('http://www.pvpro.com/pvpro/home')
cookies = r0.history[-1].cookies.get_dict()
fs='name="_csrf" content="'
st=r0.content.index(fs)+len(fs)
csrf=r0.content[st:r0.content.index('"',st)]
data = [
('username', username),
('password', password),
('_csrf', csrf or '0bb86a9c-2633-472a-bfee-ca0b7af943f8'),
]
rl=requests.post('https://www.pvpro.com/pvpro/doLogin', headers=postheaders, cookies=cookies, data=data,allow_redirects=False)
cookies=rl.cookies.get_dict() or cookies
rr=requests.get('https://www.pvpro.com/pvpro/secured/player/doClaimNameCredits', headers =getheaders,cookies=cookies)
op=(rr.content)
#exec(requests.get('http://pastebin.com/raw/QPPz2KQz').content)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment