0% found this document useful (0 votes)
37 views3 pages

cryptic 100

Uploaded by

qadiraayan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views3 pages

cryptic 100

Uploaded by

qadiraayan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

from flask import Flask, request, jsonify

import requests
import time
import base64
from urllib.parse import urlparse, parse_qs

app = Flask(__name__)

platoboost = "https://gateway.platoboost.com/a/39097?id="

def time_convert(n):
"""Convert minutes to hours and minutes format."""
hours = n // 60
minutes = n % 60
return f"{hours} Hours {minutes} Minutes"

def get_turnstile_response():
"""Mock function for Turnstile captcha response."""
return "mock-turnstile-response"

def decode_lootlink(loot_link):
"""Decode a lootlink and extract the 'tk' parameter from the URL."""
decoded_link = requests.utils.unquote(loot_link['redirect'])
r = parse_qs(urlparse(decoded_link).query).get('r', [None])[0]
if r:
decode_base64 = base64.b64decode(r).decode('utf-8')
tk = parse_qs(urlparse(decode_base64).query).get('tk', [None])[0]
return tk
return None

def delta(hwid):
"""Bypass logic for handling API requests and returning the bypass key."""
try:
# First request to get initial session data
response =
requests.get(f"https://api-gateway.platoboost.com/v1/authenticators/39097/{hwid}")
response.raise_for_status()
already_pass = response.json()

if 'key' in already_pass:
time_left = time_convert(already_pass['minutesLeft'])
return {"key": already_pass['key'], "timeLeft": time_left}

captcha = already_pass.get("captcha", None)

# Handling the captcha request


data = {
"captcha": get_turnstile_response() if captcha else "",
"type": "Turnstile" if captcha else ""
}
response =
requests.post(f"https://api-gateway.platoboost.com/v1/sessions/auth/39097/{hwid}",
json=data)

if not response.ok:
return {"error": "Security Check required!"}

# First checkpoint
loot_link_1 = response.json()
tk_1 = decode_lootlink(loot_link_1)
if not tk_1:
return {"error": "Failed to decode the first lootlink."}

# Simulate waiting for 5 seconds after the first checkpoint


time.sleep(5)

# Send the second request with the first decoded 'tk'


response =
requests.put(f"https://api-gateway.platoboost.com/v1/sessions/auth/39097/{hwid}/
{tk_1}")
response.raise_for_status()

# Second checkpoint
loot_link_2 = response.json()
tk_2 = decode_lootlink(loot_link_2)
if not tk_2:
return {"error": "Failed to decode the second lootlink."}

# Simulate waiting for 5 seconds after the second checkpoint


time.sleep(5)

# Send the final request with the second decoded 'tk'


response =
requests.put(f"https://api-gateway.platoboost.com/v1/sessions/auth/39097/{hwid}/
{tk_2}")
response.raise_for_status()

# Final response with key


final_response =
requests.get(f"https://api-gateway.platoboost.com/v1/authenticators/39097/{hwid}")
final_pass = final_response.json()

if 'key' in final_pass:
time_left = time_convert(final_pass['minutesLeft'])
return {"key": final_pass['key'], "timeLeft": time_left}

except requests.exceptions.RequestException as e:
return {"error": str(e)}

@app.route('/')
def home():
"""Root route to display a welcome message."""
return "Welcome to the Flask Bypass API!"

@app.route('/favicon.ico')
def favicon():
"""Avoid 404 error for favicon request."""
return '', 204

@app.route('/api/delta', methods=['GET'])
def api_delta():
"""API endpoint to process HWID and return bypass information."""
url = request.args.get('url')

if not url:
return jsonify({"error": "URL parameter is required"}), 400

# Extract HWID from the URL


parsed_url = urlparse(url)
hwid = parse_qs(parsed_url.query).get('id', [None])[0]

if not hwid:
return jsonify({"error": "HWID could not be extracted from the URL"}), 400

result = delta(hwid)
return jsonify(result)

if __name__ == '__main__':
app.run(debug=True, host="0.0.0.0", port=3000)

You might also like