Last active
November 22, 2022 16:11
-
-
Save sonya75/81cd19b16c362e80da285c97653c5535 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from requests.packages.urllib3.exceptions import InsecureRequestWarning | |
requests.packages.urllib3.disable_warnings(InsecureRequestWarning) | |
MAXTHREADS=10 | |
ACCFILENAME="accounts.txt" | |
VERIFIEDACCFILENAME="verifiedaccounts.txt" | |
def checkacc(x): | |
v=x.split(":") | |
sess=requests.session() | |
m_login_data = {'keepMeLoggedIn':True, 'client_id':'PbCREuPr3iaFANEDjtiEzXooFl7mXGQ7','ux_id':'com.nike.commerce.snkrs.droid','grant_type':'password','username':v[0],'password':v[1]} | |
sess.headers.update({"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36","Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Accept-Language":"en-US,en;q=0.9,ms;q=0.8"}) | |
e=sess.post('https://api.nike.com/idn/shim/oauth/2.0/token',json=m_login_data,verify=False,timeout=30) | |
TOKEN=e.json()["access_token"] | |
ee=sess.get("https://idn.nike.com/user/accountsettings",headers={"Authorization":("Bearer "+TOKEN)}) | |
print "{0}, Number: {1}\n".format(v[0],ee.json().get("verifiedphone")), | |
return (ee.json().get("verifiedphone")!=None) | |
vl=open(ACCFILENAME,'r').read().split("\n") | |
import Queue | |
vq=Queue.Queue() | |
for pl in vl: | |
pl=pl.strip() | |
if pl!="": | |
vq.put(pl) | |
def dochecks(): | |
while True: | |
try: | |
b=vq.get_nowait() | |
except: | |
return | |
try: | |
if checkacc(b): | |
with globallock: | |
with open(VERIFIEDACCFILENAME,'ab') as x: | |
x.write(b+"\r\n") | |
except Exception as e: | |
print "{0} : Login failed".format(b), | |
from threading import Thread,Lock | |
globallock=Lock() | |
for i in range(0,MAXTHREADS): | |
Thread(target=dochecks).start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you tell me where the API was found?
this https://api.nike.com/idn/shim/oauth/2.0/token
Why did I search all the projects related to NIKE, and I didn't find such a API.