1. Registration on disney.com is very simple, without any encryption
2. You only need to solve one Google recaptcha
3. This is just a registration demo, if you need more functions, please code it yourself or contact me to customize the bot
2. You only need to solve one Google recaptcha
3. This is just a registration demo, if you need more functions, please code it yourself or contact me to customize the bot
[ Hidden Content! ]
Code:
import base64
from math import fabs
import requests
import json
import sys
import random
import string
import uuid
import urllib
# captcha api config on https://www.clearcaptcha.com
clearcaptcha_recaptcha_api="http://api.clearcaptcha.com/captcha/recaptcha_enterprise_v2v3";
token = 'test' # need replace your clearcaptcha token
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
def generate_random_string(length):
letters = string.ascii_letters
return ''.join(random.choice(letters) for _ in range(length))
session = requests.Session()
headers={
"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",
"Referer": "https://cdn.registerdisney.go.com",
"Origin": "https://cdn.registerdisney.go.com",
"Upgrade-Insecure-Requests": "1",
'sec-ch-ua': '"Microsoft Edge";v="129", "Not=A?Brand";v="8", "Chromium";v="129"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Windows"',
"Sec-Fetch-Dest": "empty",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Site": "same-site",
"Sec-Fetch-User": "?1",
"Connection": "keep-alive",
}
random_email = generate_random_string(10)+"@outlook.com"
password="testtest.123456"
post_data = {
"email": random_email
}
headers["Content-Type"]="application/json"
headers["conversation-id"]=str(uuid.uuid4())
headers["correlation-id"]=str(uuid.uuid4())
oneid='{"conversationId":"'+headers["conversation-id"]+'"}'
headers["oneid-reporting"]=base64.b64encode(oneid.encode('utf-8')).decode('utf-8')
response = session.post("https://registerdisney.go.com/jgc/v8/client/DTCI-MATTERHORN.DCOM.WEB-PROD/guest-flow?langPref=en-US&feature=no-password-reuse", json=post_data,headers=headers,verify=False)
if response.status_code != 200:
print({"error": "api error","status_code": response.status_code,"response": response.text})
sys.exit()
response_data=response.json()
if response_data["data"]["guestFlow"] != "REGISTRATION_FLOW":
print(f"{random_email} has been registered")
sys.exit()
if 'api-key' in response.headers:
api_key = response.headers['api-key']
print(f"API Key: {api_key}")
else:
print("API Key not found in the response headers.")
headers["authorization"]="APIKEY "+api_key
headers["conversation-id"]=response.headers['conversation-id']
headers["correlation-id"]=response.headers['correlation-id']
oneid='{"conversationId":"'+headers["conversation-id"]+'"}'
headers["oneid-reporting"]=base64.b64encode(oneid.encode('utf-8')).decode('utf-8')
post_data = {
"password": password
}
response = session.post("https://registerdisney.go.com/jgc/v8/client/DTCI-MATTERHORN.DCOM.WEB-PROD/validate?langPref=en-US&feature=no-password-reuse", json=post_data,headers=headers,verify=False)
if response.status_code != 200:
print({"error": "api error","status_code": response.status_code,"response": response.text})
sys.exit()
response_data=response.json()
if response_data["data"] != None:
print(f"{password} Password verification failed")
sys.exit()
if 'api-key' in response.headers:
api_key = response.headers['api-key']
print(f"API Key: {api_key}")
else:
print("API Key not found in the response headers.")
headers["authorization"]="APIKEY "+api_key
headers["conversation-id"]=response.headers['conversation-id']
headers["correlation-id"]=response.headers['correlation-id']
oneid='{"conversationId":"'+headers["conversation-id"]+'"}'
headers["oneid-reporting"]=base64.b64encode(oneid.encode('utf-8')).decode('utf-8')
post_data = {
"token": token,
"sitekey": "6Lck8IUfAAAAABpd98whDTBeR8-QFbpFUYbFcz6P",
"referer":"https://cdn.registerdisney.go.com/v4/bundle/web/DTCI-MATTERHORN.DCOM.WEB/en-US?logLevel=INFO",
"recaptcha_anchor_size":"invisible",
"page_title":"ONEID UI WEB",
"action":"register"
}
response = requests.post(clearcaptcha_recaptcha_api, data=post_data)
if response.status_code != 200:
print({"error": "api error", "status_code": response.status_code, "response": response.text})
sys.exit()
response_data = response.json()
if response_data['code']!=200:
print(response.text)
sys.exit()
recaptcha_token=response_data["data"]["recaptcha_token"]
headers["g-recaptcha-token"]=recaptcha_token
post_data = {
"marketing": [
{
"code": "WDIGFamilySites",
"subscribed": True,
"textId": "BU_*_LOCATION_*__403090d99dfb80d30be96bf491a084cc"
}
],
"profile": {
"email": random_email,
"firstName": generate_random_string(6),
"lastName": generate_random_string(6),
"dateOfBirth": "1991-02-02",
"region": "US"
},
"legalAssertions": [
"gtou_ppv2_proxy"
],
"password": password,
"recaptchaToken": recaptcha_token
}
headers["Content-Type"]="application/json"
response = session.post("https://registerdisney.go.com/jgc/v8/client/DTCI-MATTERHORN.DCOM.WEB-PROD/guest/register?autogeneratePassword=false&autogenerateUsername=true&langPref=en-US&feature=no-password-reuse", json=post_data,headers=headers,verify=False)
if response.status_code != 200:
print({"error": "api error","status_code": response.status_code,"response": response.text})
sys.exit()
if '"sessionTransferKey":"' in response.text:
print(f"Registration successful, Email:{random_email}, Password:{password}")
elif '"code":"AUTHORIZATION_OTP_VERIFICATION_REQUIRED"' in response.text & '"accessToken":"' in response.text:
print('send email code')
response_data=response.json()
assessmentId=response_data["error"]["errors"][0]["data"]["assessmentId"]
accessToken=response_data["error"]["errors"][0]["data"]["accessToken"]
post_data = {
"email": random_email,
"assessmentId": assessmentId,
"arkoseSessionId": None
}
response = session.post("https://registerdisney.go.com/jgc/v8/client/DTCI-MATTERHORN.DCOM.WEB-PROD/notification/otp/registration?langPref=en-US&feature=no-password-reuse", json=post_data,headers=headers,verify=False)
if response.status_code != 200:
print({"error": "api error","status_code": response.status_code,"response": response.text})
sys.exit()
if '"sessionId":"' in response.text:
print('mail code send success')
else:
response_data={"error": "api error","status_code": response.status_code,"response": response.text}
print(response_data)
else:
response_data={"error": "api error","status_code": response.status_code,"response": response.text}
print(response_data)