博客
How to solve AWS (AMAZON) WAF Captcha Token

How to solve AWS (AMAZON) WAF Captcha Token

Logo of Capsolver

CapSolver Blogger

How to use capsolver

12-Jul-2023

How to Solve AWS WAF Captcha

Solve AWS Captcha
aws captcha grid solver

Before we start solving AWS WAF Captcha, there are some requirements and points that we need to be aware of:

🔒 Requirements:

  • CapSolver Key
  • Proxy (Optional)

Proxy is optional, depends on the task type used, will be required / optional.

📒 Points to be aware of:

⚠️When the status code returned by the captcha page is 202, you only need to pass awsChallengeJs.
⚠️ When the status code returned by the captcha page is 405, you need to pass in awsKey, awsIv, awsContext, and awsChallengeJs.

  • Ensure the validity of the website URL
    To verify the authenticity of the website URL, ensure that it returns a 405 status code and the HTML contains elements like iv, key, and context.
  • Triggering the AWS Captcha is necessary to access this URL.
  • The URL should yield an HTML response comprising the key, iv, and context.
    As illustrated in these images, a matching URL will yield a 405 status code, and its HTML will include elements such as key, iv, and context.
    Page with status code 405
    Html of a page with status code 405
    - Save the url of the challenge script, context value, iv value and key value.

To solve AWS WAF Captcha, follow our documentation. For this example, we will only use the required parameters. The task types for AWS WAF Captcha are:

  • AntiAwsWafTaskProxyless: This task type use the proxies from capsolver.
  • AntiAwsWafTask: This task type requires your own proxies.

In this case, the task type that will be used in this blog, will be AntiAwsWafTaskProxyLess.

📤 Step 1: Submit the information to Capsolver

⚠️ When the status code returned by the captcha page is 405, you need to pass awsKey, awsIv, awsContext, and awsChallengeJs.

Status code 405

POST https://api.capsolver.com/createTask
{
 "clientKey":"yourapiKey",
 "task":
 {
 "type":"AntiAwsWafTaskProxyless",
 "websiteURL":"https://efw47fpad9.execute-api.us-east-1.amazonaws.com/latest",
  "awsKey":"key value",
  "awsIv":"iv value",
  "awsContext":"context value",
  "awsChallengeJS":"Url of the js challenge"
 }
}

⚠️When the status code returned by the captcha page is 202, you only need to pass awsChallengeJs.

Status code 202

{
 "clientKey":"yourapiKey",
 "task":
 {
 "type":"AntiAwsWafTaskProxyless",
 "websiteURL":"https://efw47fpad9.execute-api.us-east-1.amazonaws.com/latest",
  "awsKey":"",
  "awsIv":"",
  "awsContext":"",
  "awsChallengeJS":"Url of the js challenge"
 }
}

This will return a response that contains taskId, save this value and submit to the step 2.

🔖 Step 2: Get the results

We will need to retrieve the getTaskResult method until the captcha is solved. Retrieve every 3-5s.

POST https://api.capsolver.com/getTaskResult
Host: api.capsolver.com
Content-Type: application/json
{
 "clientKey":"YOUR_API_KEY",
 "taskId": "TASKID OF CREATETASK" //ID created by the createTask method
}

Captcha solution will look like:
AWS CAPTCHA TOKEN SOLUTION

After the captcha has been solved, you need to create the cookie aws-waf-token and add the value that you got from capsolver response.

In conclusion, solving AWS WAF Captcha can be a daunting task, but with the help of capsolver.com, it can be done quickly and efficiently. By following the steps outlined above, you can easily solve AWS WAF Captcha.

更多

web scraping captcha solving
解决爬虫时遇到的CAPTCHA最好的方法

在Web爬取过程中,遇到验证码可能会带来相当大的挑战。本文将探讨在Web爬虫过程中遇到的不同类型的CAPTCHA,并讨论解决CAPTCHA的最佳方法。

The other captcha

28-Dec-2023

web scraping captcha solver
如何解决在爬虫的过程中遇到的CAPTCHA?

在本文中,我们将探讨为什么在Web爬虫过程中会遇到CAPTCHA,并讨论解决Web爬虫中CAPTCHA问题的最佳方法,重点关注Capsolver的集成。

The other captcha

27-Dec-2023

如何识别Queue-it captcha验证码
如何识别Queue-it captcha验证码

Queue-it是一个平台,提供在线流量管理解决方案,其中包括三种CAPTCHA工具,以帮助减轻机器人和滥用问题:Google ReCAPTCHA、Google ReCAPTCHA Invisible和Queue-it CAPTCHA。

The other captcha

13-Jul-2023

如何解决AWS WAF Captcha亚马逊验证码
如何解决AWS WAF Captcha亚马逊验证码

总之,解决AWS WAF Captcha可能是一项艰巨的任务,但是通过capsolver.com的帮助,可以快速高效地完成。通过本文步骤,您可以轻松解决AWS WAF Captcha。

The other captcha

13-Jul-2023

使用 CapSolver 识别文字图像验证码
使用 CapSolver 识别文字图像验证码

图像验证码通常作为网站上识别人类用户和机器人的一种常见安全措施。这些验证码通常要求用户在图像或一系列图像中识别特定元素。在本篇博客文章中,我们将指导您如何使用 CapSolver 解决图像验证码。

The other captcha

27-Jun-2023

如何使用图像识别自动绕过/识别 Amazon WA Captcha (AWS WAF) 验证码
如何使用图像识别自动绕过/识别 Amazon WA Captcha (AWS WAF) 验证码

通过CapSolver绕过Amazon WAF是一个简单的过程。它涉及使用createTask方法创建任务并提供必要的细节。请记住使用正确的任务类型并在任务对象结构中提供所需的属性。

The other captcha

09-Jun-2023