Menu

Bypass Amazon WAF with a proxy

Use this type of tasks to obtain Amazon WAF cookie token. Simply grab temporary iv and context tokens along with permanent key site key, send them to our API. Result of the task is a token which you can use in your HTTP request as a cookie value with name amazon-waf-token.

This type of task requires a proxy. Please use it only if proxy-off tasks (AmazonTaskProxyless) are failing, as it slows down our workers. Solving captchas with proxies also requires super high quality of your proxies which you should install yourself on your own VPS servers and never use purchased proxy services.

Amazon WAF captcha example
Captcha example

Task object

PropertyTypeRequiredPurpose
typeStringYesAmazonTask
websiteURLStringYesAddress of a target web page. Can be located anywhere on the web site, even in a member area. Our workers don't navigate there but simulate the visit instead.
websiteKeyStringYesValue of key from window.gokuProps object in WAF page source code.
ivStringYesValue of iv from window.gokuProps object in WAF page source code.
contextStringYesValue of context from window.gokuProps object in WAF page source code.
captchaScriptStringNoOptional URL leading to captcha.js
challengeScriptStringNoOptional URL leading to challenge.js
proxyTypeStringYesType of proxy
http - usual http/https proxy
socks4 - socks4 proxy
socks5 - socks5 proxy
proxyAddressStringYesProxy IP address ipv4/ipv6. No host names or IP addresses from local networks.
proxyPortIntegerYesProxy port
proxyLoginStringYesLogin for proxy which requires authorization (basic)
proxyPasswordStringYesProxy password

Request example

Python
Javascript
Go
PHP
Java
C#
bash
#pip3 install anticaptchaofficial

from anticaptchaofficial.amazonproxyon import *

solver = amazonProxon()
solver.set_verbose(1)
solver.set_key("YOUR_API_KEY")
solver.set_website_url("https://website.com")
solver.set_website_key("key_value_from_window.gokuProps_object")
solver.set_iv("iv_value_from_window.gokuProps_object")
solver.set_context("context_value_from_window.gokuProps_object")
solver.set_proxy_address("PROXY_ADDRESS")
solver.set_proxy_port(1234)
solver.set_proxy_login("proxylogin")
solver.set_proxy_password("proxypassword")

# Optional script URLs
solver.set_captcha_script("https://e9b10f157f38.9a96e8b4.us-gov-west-1.captcha.awswaf.com/e9b10f157f38/76cbcde1c834/2a564e323e7b/captcha.js")
solver.set_challenge_script("https://e9b10f157f38.9a96e8b4.us-gov-west-1.token.awswaf.com/e9b10f157f38/76cbcde1c834/2a564e323e7b/challenge.js")

# Specify softId to earn 10% commission with your app.
# Get your softId here: https://anti-captcha.com/clients/tools/devcenter
solver.set_soft_id(0)

token = solver.solve_and_return_solution()
if token != 0:
    print "token: "+token
else:
    print "task finished with error "+solver.error_code

Task solution object

PropertyTypePurpose
tokenStringUse this token as a cookie value with name "aws-waf-token" in your request to the target web page.

Response example

{
    "errorId":0,
    "status":"ready",
    "solution": {
      "token": "fe4c2ff3-6ed6-40fa-95c9-4c738a7dad49:FgoAe0ZLBmYBAAAA:LK0S/m1nGbfjDk/9i6tMmiUWGecMfyjvuAx9lY6ZhaBUmjrILEqW00UAsEliykPjwebdzn9J3..."
    },
    "cost":"0.002000",
    "ip":"46.98.54.221",
    "createTime":1472205564,
    "endTime":1472205570,
    "solveCount":"0"
}