ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Other languages

premiersports.com login demo source

Submitted by sysdemo at 15-02-2025, 08:31 AM


premiersports.com login demo source
1.043 Views
sysdemo's Avatar'
sysdemo
Offline
#1
[ Hidden Content! ]

Code:
import requests
import json
import re
import sys

# captcha api config on https://www.clearcaptcha.com
clearcaptcha_api="http://api.clearcaptcha.com/captcha/cloudflare_turnstile";
#change your token
token = 'test'
#Keep the website and IP in the same region, otherwise the address will be adjusted to the region and you will not be able to log in successfully.
url = "https://www.premiersports.com/us/login"
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
chlApiSitekey = "0x4AAAAAAAhLu-06g4o3tB7m"

session=requests.session()

post_data = {
    "token": token,
    "url": url,
    "chlApiSitekey": chlApiSitekey,
}
post_data=json.dumps(post_data)

response = requests.post(clearcaptcha_api, data=post_data)
if response.status_code == 200:
    response_data = response.json()
    print(response_data)
else:
    print({
        "error": "api error",
        "status_code": response.status_code,
        "response": response.text
    })
    

cf_turnstile_token=response_data.get("data", {}).get("cf_turnstile_token", {})

headers={
        "Content-Type":"application/x-www-form-urlencoded",
        "User-Agent": user_agent,
        "Accept": "application/json, text/javascript, */*; q=0.01",
        "Accept-Language": "en-US,en;q=0.5",
        "Accept-Encoding": "gzip, deflate, br, zstd",
        "Referer": "https://www.premiersports.com/us/login",
        "Origin": "https://www.premiersports.com/us/login",
        "Upgrade-Insecure-Requests": "1",
        "Sec-Fetch-Dest": "document",
        "Sec-Fetch-Mode": "navigate",
        "Sec-Fetch-Site": "same-origin",
        "Sec-Fetch-User": "?1",
        "Connection": "keep-alive",
        "Priority": "u=1"
    }

response = session.get(url,headers=headers,verify=False)
responseText=response.text
match= re.search(r'<meta\s+name="csrf-token"\s+content="([^"]+)"', responseText)
if match:
    csrf_token = match.group(1)
    print(csrf_token)
else:
    print(f" not found csrf-token")
    sys.exit(1)
    
post_data =  {
    "email": "[email protected]",
    "password": "test123456",
    "remember":"on",
    "_token":csrf_token,
    "cf-turnstile-response":cf_turnstile_token,
    "g-recaptcha-response":cf_turnstile_token,
}

response = session.post(url, data=post_data,headers=headers,verify=False)
responseText=response.text
if "These credentials do not match our records" in responseText:
    #Continue with the following operation
    print("These credentials do not match our records.");
else:
    response_data={
        "error": "api error",
        "status_code": response.status_code,
        "response": ""
    }

0
Reply


Messages In This Thread
premiersports.com login demo source - by sysdemo - 15-02-2025, 08:31 AM


Users browsing this thread: 1 Guest(s)