UNLOCK API

API per risolvere Amazon AWS WAF

Invia un task Amazon AWS WAF all'API e ricevi la risposta che il tuo codice invia alla pagina. URL della pagina, site key WAF e valori iv e context della pagina di challenge. Ricevi: Valori per il cookie aws-waf-token.

In breve

Prezzo ogni 1,000
$0.70 ($0.0007 per task)
Tipo createTask
AmazonTaskProxyless, AmazonTask
Metodo in.php
amazon_waf
Invii
URL della pagina, site key WAF e valori iv e context della pagina di challenge
Ricevi
Valori per il cookie aws-waf-token

Dove trovare i valori

Nella pagina di challenge AWS WAF, key, iv e context si trovano nell'oggetto window.gokuProps del sorgente della pagina. Inviali come websiteKey, iv e context.

createTask e getTaskResult

Crea il task, attendi circa 5 secondi, poi controlla il risultato ogni 5 secondi finché lo stato è ready. Se il task fallisce, l'API restituisce un errore e l'importo torna sul saldo.

import time, requests

API = "https://unlock-api.com"
KEY = "YOUR_API_KEY"

task = requests.post(f"{API}/createTask", json={
    "clientKey": KEY,
    "task": {
      "type": "AmazonTaskProxyless",
      "websiteURL": "https://example.com/login",
      "websiteKey": "AQIDAHjcYu/GjX+QlghicBgQ/7bFaQZ+m5FKCMDnO+vTbNg96AH...",
      "iv": "CgAFRjIw2vAAABSM",
      "context": "zPT0jOl1rQlUNaldX6LUpn4D6Tl9bJ8VUQ..."
    }
}).json()
if task["errorId"]:
    raise SystemExit(task["errorCode"])

for _ in range(60):   # 60 x 5 s = the 5 minute task limit
    time.sleep(5)
    r = requests.post(f"{API}/getTaskResult", json={"clientKey": KEY, "taskId": task["taskId"]}).json()
    if r["errorId"]:
        raise SystemExit(f"{r['errorCode']}: {r.get('errorDescription', '')}")   # failed tasks are refunded
    if r["status"] == "ready":
        print(r["solution"])
        break
else:
    raise SystemExit("timed out")

in.php e res.php

Lo stesso task con la classica API a form. Aggiungi json=1 per ricevere risposte JSON; senza, le risposte sono in testo semplice, ad esempio OK|1001.

curl -s "https://unlock-api.com/in.php" -d "key=YOUR_API_KEY&method=amazon_waf&sitekey=KEY&iv=IV&context=CONTEXT&pageurl=https://example.com/login&json=1"
# {"status":1,"request":"1001"}

curl -s "https://unlock-api.com/res.php?key=YOUR_API_KEY&action=get&id=1001&json=1"
# {"status":0,"request":"CAPCHA_NOT_READY"}  then  {"status":1,"request":"ANSWER"}

Riferimento API completo: tutti i parametri e l'oggetto solution