diff --git a/docs/captchas/alibaba-task.mdx b/docs/captchas/alibaba-task.mdx index 2dc5d5cb..9cd73f99 100644 --- a/docs/captchas/alibaba-task.mdx +++ b/docs/captchas/alibaba-task.mdx @@ -41,6 +41,16 @@ import McpNotice from '@site/src/components/McpNotice'; ![](./images/alibaba-task/slider.png) ![](./images/alibaba-task/checkbox.png) +
+**TRACELESS — невидимая проверка** + +CapMonster Cloud также поддерживает Alibaba CAPTCHA `TRACELESS` — фоновую проверку без видимого задания, которая анализирует данные браузера, устройства и поведение пользователя. + +Определить этот тип можно по `"CaptchaType": "TRACELESS"` в ответе на запрос загрузки капчи на вкладке **Network** в инструментах разработчика. + +![](./images/alibaba-task/traceless.png) +
+ :::warning **Внимание!** CapMonster Cloud по умолчанию работает через встроенные прокси – они уже включены в стоимость. Указывать собственные прокси требуется только в тех случаях, когда сайт не принимает токен или доступ к встроенным сервисам ограничен. @@ -143,9 +153,11 @@ CapMonster Cloud по умолчанию работает через встро -Возвращает cookies вместе с результатом решения CAPTCHA. +Возвращает cookies вместе с результатом решения CAPTCHA.
+Используйте значение `true` для сайтов с **Alibaba WAF**, если после успешного прохождения проверки требуется получить cookies. +Наличие cookies `ssxmod_itna` и `ssxmod_itna2` — признак того, что на сайте используется **Alibaba WAF**, а не обычная CAPTCHA. -Используйте значение `true` только для сайтов, использующих **Alibaba WAF** или **Amazon WAF**, где после успешного прохождения проверки требуется получить cookies. +*см. подробнее в разделе [Как отличить Alibaba WAF от Alibaba CAPTCHA](#как-отличить-alibaba-waf-от-alibaba-captcha)* По умолчанию параметр не используется. @@ -194,6 +206,16 @@ CapMonster Cloud по умолчанию работает через встро +## Как отличить Alibaba WAF от Alibaba CAPTCHA + +Наличие cookies `ssxmod_itna` и `ssxmod_itna2` указывает на использование Alibaba WAF. При обычной Alibaba CAPTCHA эти cookies отсутствуют. + +Чтобы проверить их наличие, откройте **Инструменты разработчика** → **Application** → **Cookies** и выберите домен сайта. + +![Cookies ssxmod_itna и ssxmod_itna2 во вкладке Application](./images/alibaba-task/alibaba-waf-cookies.png) + +Если сайт использует Alibaba WAF и для дальнейших запросов нужны cookies, передайте `cookieRequired: true` в объекте `metadata` при создании задачи. + ## Метод создания задачи @@ -461,7 +483,7 @@ https://ru.api.capmonster.cloud/createTask ### Вариант с возвратом cookies (`cookieRequired`) -Для некоторых сайтов, использующих **Alibaba WAF** или **Amazon WAF**, после успешного решения необходимо получить cookies, которые затем используются при последующих запросах. +Для некоторых сайтов, использующих **Alibaba WAF**, после успешного решения необходимо получить cookies, которые затем используются при последующих запросах. Для этого добавьте в объект `metadata` параметр: diff --git a/docs/captchas/images/alibaba-task/alibaba-waf-cookies.png b/docs/captchas/images/alibaba-task/alibaba-waf-cookies.png new file mode 100644 index 00000000..9ad5b5b0 Binary files /dev/null and b/docs/captchas/images/alibaba-task/alibaba-waf-cookies.png differ diff --git a/docs/captchas/images/alibaba-task/traceless.png b/docs/captchas/images/alibaba-task/traceless.png new file mode 100644 index 00000000..a6654674 Binary files /dev/null and b/docs/captchas/images/alibaba-task/traceless.png differ diff --git a/docs/captchas/images/tendi/aid-encrypted.png b/docs/captchas/images/tendi/aid-encrypted.png new file mode 100644 index 00000000..7c8194fb Binary files /dev/null and b/docs/captchas/images/tendi/aid-encrypted.png differ diff --git a/docs/captchas/tendi.mdx b/docs/captchas/tendi.mdx index f5eaf7da..df6a2eb6 100644 --- a/docs/captchas/tendi.mdx +++ b/docs/captchas/tendi.mdx @@ -64,6 +64,19 @@ CapMonster Cloud по умолчанию работает через встро --- + + +Параметр содержит значение Aid, которое необходимо получить с целевого сайта перед созданием задачи. + +Пример: `HHuVfL451oAYXSwVa87xnU4QHER9ufsPpaSomCugX5Il/Nc2vLTu2dgoguMwmhAM` + +**Важно**: данный параметр используется не на всех сайтах. Если сайт не возвращает Aid, `aidEncrypted` передавать не нужно. +Значение `aidEncrypted` является **одноразовым**: для каждой новой задачи необходимо получать новый Aid. + +Подробнее см. в разделе [Как получить aidEncrypted](#как-получить-aidencrypted). + +--- + User-Agent браузера. Используйте текущее значение, поддерживаемое CapMonster Cloud: `userAgentPlaceholder`
@@ -126,6 +139,8 @@ https://ru.api.capmonster.cloud/createTask Подробнее в разделе [createTask](/docs/api/methods/create-task/). ::: +
+Если на сайте используется `aidEncrypted`, передавайте его в `metadata`. Для каждой новой задачи получайте новое значение с сайта. @@ -142,7 +157,7 @@ https://ru.api.capmonster.cloud/createTask "websiteKey": "your-website-key", "userAgent": "userAgentPlaceholder", "metadata": { - "captchaUrl": "https://global.captcha.example.com/TCaptcha-global.js" + "captchaUrl": "https://example.com/TCaptcha.js" } } } @@ -171,7 +186,7 @@ https://ru.api.capmonster.cloud/createTask "websiteKey": "your-website-key", "userAgent": "userAgentPlaceholder", "metadata": { - "captchaUrl": "https://global.captcha.example.com/TCaptcha-global.js" + "captchaUrl": "https://example.com/TCaptcha.js" }, "proxyType": "your-proxy-type", "proxyAddress": "your-proxy-address", @@ -263,6 +278,48 @@ https://ru.api.capmonster.cloud/getTaskResult `*` в имени файла означает произвольную или пустую строку. Например, шаблон `TJNCaptcha*.js` может соответствовать файлам `TJNCaptcha.js` или `TJNCaptcha-global.js`. +## Как получить aidEncrypted + +Если на сайте используется Aid, получите его отдельным запросом перед созданием задачи и передайте полученное значение в параметре `aidEncrypted` внутри объекта `metadata`. + +Откройте **Инструменты разработчика**, перейдите на вкладку **Network** и активируйте CAPTCHA. Найдите запрос, с помощью которого сайт получает Aid, и скопируйте значение из ответа. + +Пример адреса запроса: + +```text +https://example.com/path/GetCaptchaAid.ashx?_=1234567890000 +``` + +В этом же запросе также может передаваться значение `websiteKey` (`AppId`). + +![](./images/tendi/aid-encrypted.png) + +Адрес запроса и формат ответа зависят от конкретного сайта. + +Пример создания задачи с параметром `aidEncrypted`: + +```json +{ + "clientKey": "API_KEY", + "task": { + "type": "CustomTask", + "class": "TenDI", + "websiteURL": "https://example.com/page-with-captcha", + "websiteKey": "YOUR_WEBSITE_KEY", + "metadata": { + "captchaUrl": "https://example.com/TCaptcha.js", + "aidEncrypted": "YOUR_AID_ENCRYPTED" + } + } +} +``` + +:::warning Важно: + +Получайте новое значение Aid перед созданием каждой задачи. Не используйте повторно значение `aidEncrypted`, полученное для предыдущей задачи, и не используйте значения из примеров документации. + +::: + ## Как найти все нужные параметры для создания задачи на решение @@ -270,7 +327,7 @@ https://ru.api.capmonster.cloud/getTaskResult Для автоматизации поиска параметров их можно извлекать через **браузер** (обычный или headless, например, с **Playwright**) или напрямую из **HTTP-запросов**. Поскольку значения динамических параметров действуют недолго, их рекомендуется использовать сразу после получения. -:::warning **Важно!** +:::warning **Важно:** Приведённые фрагменты кода являются базовыми примерами для ознакомления в извлечении необходимых параметров. Точная реализация будет зависеть от вашего сайта с капчей, его структуры и используемых HTML-элементов и селекторов. ::: diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx index e0230a98..d78561da 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx @@ -42,6 +42,16 @@ Below are examples of Alibaba Captcha task types that are currently supported by ![](./images/alibaba-task/checkbox.png) +
+**TRACELESS — invisible verification** + +CapMonster Cloud also supports Alibaba CAPTCHA `TRACELESS` — a background check with no visible challenge that analyzes browser and device data, as well as user behavior. + +You can identify this type by `"CaptchaType": "TRACELESS"` in the response to the CAPTCHA loading request in the **Network** tab of your browser’s developer tools. + +![](./images/alibaba-task/traceless.png) +
+ :::warning **Attention!** CapMonster Cloud uses built-in proxies by default – their cost is already included in the service. You only need to specify your own proxies in cases where the website does not accept the token or access to the built-in services is restricted. @@ -143,9 +153,11 @@ Example: `https://example.com:443//api/example/testlogin/_____tmd_____/punish?x5 -Returns cookies together with the CAPTCHA solution. +Returns cookies together with the CAPTCHA solution.
+Use `true` for websites with **Alibaba WAF** if cookies are required after successful verification. +The presence of the `ssxmod_itna` and `ssxmod_itna2` cookies indicates that the website uses **Alibaba WAF** rather than a regular CAPTCHA. -Use `true` only for websites that use **Alibaba WAF** or **Amazon WAF** and require cookies after successful verification. +*For details, see [How to distinguish Alibaba WAF from Alibaba CAPTCHA](#how-to-distinguish-alibaba-waf-from-alibaba-captcha).* By default, this parameter is not used. @@ -194,6 +206,16 @@ You can get the latest value at: [https://capmonster.cloud/api/useragent/actual] +## How to distinguish Alibaba WAF from Alibaba CAPTCHA + +The presence of the `ssxmod_itna` and `ssxmod_itna2` cookies indicates that the website uses Alibaba WAF. These cookies are absent when a regular Alibaba CAPTCHA is used. + +To check for these cookies, open **Developer Tools** → **Application** → **Cookies** and select the website's domain. + +![ssxmod_itna and ssxmod_itna2 cookies in the Application tab](./images/alibaba-task/alibaba-waf-cookies.png) + +If the website uses Alibaba WAF and cookies are needed for subsequent requests, pass `cookieRequired: true` in the `metadata` object when creating the task. + ## Create task method ### Standard variant (without additional parameters) @@ -461,7 +483,7 @@ Alibaba Punish may use verification methods such as selecting matching images or ### Option with cookie return (`cookieRequired`) -For some websites using **Alibaba WAF** or **Amazon WAF**, cookies must be obtained after the CAPTCHA is successfully solved. These cookies are then used in subsequent requests. +For some websites using **Alibaba WAF**, cookies must be obtained after the CAPTCHA is successfully solved. These cookies are then used in subsequent requests. To enable this, add the following parameter to the `metadata` object: diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/alibaba-task/alibaba-waf-cookies.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/alibaba-task/alibaba-waf-cookies.png new file mode 100644 index 00000000..9ad5b5b0 Binary files /dev/null and b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/alibaba-task/alibaba-waf-cookies.png differ diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/alibaba-task/traceless.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/alibaba-task/traceless.png new file mode 100644 index 00000000..a6654674 Binary files /dev/null and b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/alibaba-task/traceless.png differ diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/tendi/aid-encrypted.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/tendi/aid-encrypted.png new file mode 100644 index 00000000..7c8194fb Binary files /dev/null and b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/tendi/aid-encrypted.png differ diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/tendi.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/tendi.mdx index 8e38e72a..77c78df4 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/tendi.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/tendi.mdx @@ -63,6 +63,19 @@ If you are using a proxy with IP authorization, make sure to whitelist the addre --- + + +This parameter contains the Aid value, which must be obtained from the target website before creating a task. + +Example: `HHuVfL451oAYXSwVa87xnU4QHER9ufsPpaSomCugX5Il/Nc2vLTu2dgoguMwmhAM` + +**Important**: this parameter is not used on all websites. If the website does not return Aid, you do not need to pass `aidEncrypted`. +The `aidEncrypted` value is **single-use**: a new Aid must be obtained for each new task. + +For details, see [How to get aidEncrypted](#how-to-get-aidencrypted). + +--- + Browser User-Agent. Use the current value supported by CapMonster Cloud: `userAgentPlaceholder`
@@ -100,6 +113,8 @@ You can get the latest value at: [https://capmonster.cloud/api/useragent/actual] ## Create task method +If the website uses `aidEncrypted`, pass it in `metadata`. Obtain a new value from the website for each new task. + @@ -120,7 +135,7 @@ You can get the latest value at: [https://capmonster.cloud/api/useragent/actual] "websiteKey": "your-website-key", "userAgent": "userAgentPlaceholder", "metadata": { - "captchaUrl": "https://global.captcha.example.com/TCaptcha-global.js" + "captchaUrl": "https://example.com/TCaptcha.js" } } } @@ -154,7 +169,7 @@ You can get the latest value at: [https://capmonster.cloud/api/useragent/actual] "websiteKey": "your-website-key", "userAgent": "userAgentPlaceholder", "metadata": { - "captchaUrl": "https://global.captcha.example.com/TCaptcha-global.js" + "captchaUrl": "https://example.com/TCaptcha.js" }, "proxyType": "your-proxy-type", "proxyAddress": "your-proxy-address", @@ -228,13 +243,56 @@ For the second version, files named `TJNCaptcha*.js` and `TJCaptcha*.js` may als `*` in the filename represents any string or an empty string. For example, the pattern `TJNCaptcha*.js` can match files such as `TJNCaptcha.js` or `TJNCaptcha-global.js`. +## How to get aidEncrypted + +If the website uses Aid, obtain it with a separate request before creating a task and pass the returned value in the `aidEncrypted` parameter inside the `metadata` object. + +Open **Developer Tools**, go to the **Network** tab, and trigger the CAPTCHA. Find the request the website uses to obtain Aid and copy the value from the response. + +Example request URL: + +```text +https://example.com/path/GetCaptchaAid.ashx?_=1234567890000 +``` + +The same request may also include the `websiteKey` (`AppId`) value. + +![](./images/tendi/aid-encrypted.png) + +The request URL and response format depend on the website. + +Example of creating a task with the `aidEncrypted` parameter: + +```json +{ + "clientKey": "API_KEY", + "task": { + "type": "CustomTask", + "class": "TenDI", + "websiteURL": "https://example.com/page-with-captcha", + "websiteKey": "YOUR_WEBSITE_KEY", + "metadata": { + "captchaUrl": "https://example.com/TCaptcha.js", + "aidEncrypted": "YOUR_AID_ENCRYPTED" + } + } +} +``` + +:::warning Important: + +Obtain a new Aid value before creating each task. Do not reuse an `aidEncrypted` value obtained for a previous task, and do not use values from the documentation examples. + +::: + + ## How to find all required parameters for task creation ### Automatically To automate parameter extraction, you can retrieve them via a **browser** (regular or headless, e.g., using **Playwright**) or directly from **HTTP requests**. Since dynamic parameter values are short-lived, it is recommended to use them immediately after retrieval. -:::warning **Important!** +:::warning **Important:** The provided code snippets are basic examples for learning how to extract the required parameters. The exact implementation will depend on your captcha page, its structure, and the HTML elements and selectors used. ::: diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx index 0077f1d4..f5378cee 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx @@ -42,6 +42,16 @@ A seguir estão exemplos de tipos de tarefas do Alibaba CAPTCHA que atualmente s ![](./images/alibaba-task/checkbox.png) +
+**TRACELESS — verificação invisível** + +O CapMonster Cloud também oferece suporte ao Alibaba CAPTCHA `TRACELESS` — uma verificação em segundo plano, sem desafio visível, que analisa dados do navegador, do dispositivo e o comportamento do usuário. + +Você pode identificar esse tipo pelo valor `"CaptchaType": "TRACELESS"` na resposta à requisição de carregamento do CAPTCHA, na aba **Network** das ferramentas de desenvolvedor do navegador. + +![](./images/alibaba-task/traceless.png) +
+ :::warning **Atenção!** O CapMonster Cloud, por padrão, funciona com proxies integrados – já incluídos no custo do serviço. É necessário especificar seus próprios proxies apenas nos casos em que o site não aceita o token ou quando o acesso aos serviços integrados está restrito. @@ -142,9 +152,11 @@ Exemplo: `https://example.com:443//api/example/testlogin/_____tmd_____/punish?x5 -Retorna cookies junto com a solução do CAPTCHA. +Retorna cookies junto com a solução do CAPTCHA.
+Use o valor `true` para sites com **Alibaba WAF** se for necessário obter cookies após a conclusão bem-sucedida da verificação. +A presença dos cookies `ssxmod_itna` e `ssxmod_itna2` indica que o site utiliza **Alibaba WAF**, e não um CAPTCHA comum. -Use o valor `true` somente para sites que utilizam **Alibaba WAF** ou **Amazon WAF** e exigem cookies após a conclusão bem-sucedida da verificação. +*Para mais detalhes, consulte [Como distinguir Alibaba WAF de Alibaba CAPTCHA](#como-distinguir-alibaba-waf-de-alibaba-captcha).* Por padrão, esse parâmetro não é utilizado. @@ -194,6 +206,16 @@ Você pode obter o valor mais recente em: [https://capmonster.cloud/api/useragen +## Como distinguir Alibaba WAF de Alibaba CAPTCHA + +A presença dos cookies `ssxmod_itna` e `ssxmod_itna2` indica o uso de Alibaba WAF. Esses cookies não estão presentes quando o site utiliza um Alibaba CAPTCHA comum. + +Para verificar a presença desses cookies, abra as **Ferramentas de Desenvolvedor** → **Application** → **Cookies** e selecione o domínio do site. + +![Cookies ssxmod_itna e ssxmod_itna2 na aba Application](./images/alibaba-task/alibaba-waf-cookies.png) + +Se o site utilizar Alibaba WAF e os cookies forem necessários para as próximas requisições, envie `cookieRequired: true` no objeto `metadata` ao criar a tarefa. + ### Variante com `punishUrl` Em alguns sites protegidos pelo Alibaba, a verificação é acionada por uma URL separada `/punish`. Nesse caso, envie a URL recebida no parâmetro `punishUrl` (dentro de `metadata`). @@ -285,7 +307,7 @@ O Alibaba Punish pode usar verificações como seleção de imagens corresponden ### Variante com retorno de cookies (`cookieRequired`) -Para alguns sites que utilizam **Alibaba WAF** ou **Amazon WAF**, é necessário obter cookies após a resolução bem-sucedida. Esses cookies são utilizados nas solicitações subsequentes. +Para alguns sites que utilizam **Alibaba WAF**, é necessário obter cookies após a resolução bem-sucedida. Esses cookies são utilizados nas solicitações subsequentes. Para isso, adicione o seguinte parâmetro ao objeto `metadata`: diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/alibaba-task/alibaba-waf-cookies.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/alibaba-task/alibaba-waf-cookies.png new file mode 100644 index 00000000..9ad5b5b0 Binary files /dev/null and b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/alibaba-task/alibaba-waf-cookies.png differ diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/alibaba-task/traceless.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/alibaba-task/traceless.png new file mode 100644 index 00000000..a6654674 Binary files /dev/null and b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/alibaba-task/traceless.png differ diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/tendi/aid-encrypted.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/tendi/aid-encrypted.png new file mode 100644 index 00000000..7c8194fb Binary files /dev/null and b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/tendi/aid-encrypted.png differ diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/tendi.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/tendi.mdx index b2dbecbd..6313241b 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/tendi.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/tendi.mdx @@ -64,6 +64,20 @@ Se o proxy utiliza autenticação por IP, é necessário adicionar o endereço * --- + + +Este parâmetro contém o valor de Aid, que deve ser obtido no site de destino antes de criar a tarefa. + +Exemplo: `HHuVfL451oAYXSwVa87xnU4QHER9ufsPpaSomCugX5Il/Nc2vLTu2dgoguMwmhAM` + +**Importante**: este parâmetro não é utilizado em todos os sites. Se o site não retornar Aid, não é necessário enviar `aidEncrypted`. + +O valor de `aidEncrypted` é de **uso único**: é necessário obter um novo Aid para cada nova tarefa. + +Para mais detalhes, consulte [Como obter aidEncrypted](#como-obter-aidencrypted). + +--- + Use o valor atual compatível com o CapMonster Cloud: `userAgentPlaceholder`
@@ -102,6 +116,8 @@ Senha do servidor proxy. ## Método de criação da tarefa +Se o site utilizar `aidEncrypted`, envie-o dentro de `metadata`. Obtenha um novo valor no site para cada nova tarefa. + @@ -122,7 +138,7 @@ Senha do servidor proxy. "websiteKey": "your-website-key", "userAgent": "userAgentPlaceholder", "metadata": { - "captchaUrl": "https://global.captcha.example.com/TCaptcha-global.js" + "captchaUrl": "https://example.com/TCaptcha.js" } } } @@ -156,7 +172,7 @@ Senha do servidor proxy. "websiteKey": "your-website-key", "userAgent": "userAgentPlaceholder", "metadata": { - "captchaUrl": "https://global.captcha.example.com/TCaptcha-global.js" + "captchaUrl": "https://example.com/TCaptcha.js" }, "proxyType": "your-proxy-type", "proxyAddress": "your-proxy-address", @@ -230,13 +246,55 @@ Para a segunda versão, também podem ser usados arquivos chamados `TJNCaptcha*. O caractere `*` no nome do arquivo representa qualquer sequência de caracteres ou uma sequência vazia. Por exemplo, o padrão `TJNCaptcha*.js` pode corresponder aos arquivos `TJNCaptcha.js` ou `TJNCaptcha-global.js`. +## Como obter aidEncrypted + +Se o site utilizar Aid, obtenha-o por meio de uma requisição separada antes de criar a tarefa e envie o valor retornado no parâmetro `aidEncrypted` dentro do objeto `metadata`. + +Abra as **Ferramentas de Desenvolvedor**, vá para a aba **Network** e ative o CAPTCHA. Encontre a requisição que o site utiliza para obter Aid e copie o valor da resposta. + +Exemplo de URL da requisição: + +```text +https://example.com/path/GetCaptchaAid.ashx?_=1234567890000 +``` + +Essa mesma requisição também pode incluir o valor de `websiteKey` (`AppId`). + +![](./images/tendi/aid-encrypted.png) + +A URL da requisição e o formato da resposta dependem do site. + +Exemplo de criação de uma tarefa com o parâmetro `aidEncrypted`: + +```json +{ + "clientKey": "API_KEY", + "task": { + "type": "CustomTask", + "class": "TenDI", + "websiteURL": "https://example.com/page-with-captcha", + "websiteKey": "YOUR_WEBSITE_KEY", + "metadata": { + "captchaUrl": "https://example.com/TCaptcha.js", + "aidEncrypted": "YOUR_AID_ENCRYPTED" + } + } +} +``` + +:::warning Importante: + +Obtenha um novo valor de Aid antes de criar cada tarefa. Não reutilize um valor de `aidEncrypted` obtido para uma tarefa anterior e não utilize os valores dos exemplos da documentação. + +::: + ## Como Encontrar Todos os Parâmetros Necessários para a Criação da Tarefa ### Automaticamente Para automatizar a extração dos parâmetros, eles podem ser obtidos via **navegador** (normal ou headless, por exemplo, usando **Playwright**) ou diretamente a partir de **requisições HTTP**. Como os valores dos parâmetros dinâmicos têm curta duração, recomenda-se utilizá-los imediatamente após a extração. -:::warning **Importante!** +:::warning **Importante:** Os trechos de código fornecidos são exemplos básicos para aprendizado sobre como extrair os parâmetros necessários. A implementação exata dependerá do seu site com captcha, sua estrutura e os elementos HTML e seletores utilizados. ::: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx index 8f426a54..4b2eb12e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx @@ -42,6 +42,16 @@ import McpNotice from '@site/src/components/McpNotice'; ![](./images/alibaba-task/checkbox.png) +
+**TRACELESS — 无感验证** + +CapMonster Cloud 还支持 Alibaba CAPTCHA `TRACELESS`,这是一种不显示验证任务的后台验证方式,通过分析浏览器、设备数据和用户行为进行验证。 + +在浏览器开发者工具的 **Network** 选项卡中,查看加载 CAPTCHA 的请求响应,即可通过 `"CaptchaType": "TRACELESS"` 识别此类型。 + +![](./images/alibaba-task/traceless.png) +
+ :::warning **注意!** CapMonster Cloud 默认通过内置代理工作——这些代理已包含在费用内。仅当网站不接受令牌或对内置服务的访问受限时,才需要指定您自己的代理。 @@ -143,9 +153,11 @@ CapMonster Cloud 默认通过内置代理工作——这些代理已包含在费 -与 CAPTCHA 识别结果一起返回 cookies。 +与 CAPTCHA 识别结果一起返回 cookies。
+如果网站使用 **Alibaba WAF**,并且成功完成验证后需要获取 cookies,请将该参数设置为 `true`。 +存在 `ssxmod_itna` 和 `ssxmod_itna2` cookies 表明该网站使用的是 **Alibaba WAF**,而不是普通验证码。 -仅当网站使用 **Alibaba WAF** 或 **Amazon WAF**,并且成功完成验证后需要获取 cookies 时,才应将该参数设置为 `true`。 +*详情请参阅[如何区分 Alibaba WAF 与 Alibaba CAPTCHA](#如何区分-alibaba-waf-与-alibaba-captcha)。* 默认情况下不使用此参数。 @@ -194,6 +206,16 @@ CapMonster Cloud 默认通过内置代理工作——这些代理已包含在费 +## 如何区分 Alibaba WAF 与 Alibaba CAPTCHA + +存在 `ssxmod_itna` 和 `ssxmod_itna2` cookies 表明网站使用了 Alibaba WAF。使用普通 Alibaba CAPTCHA 时,不会存在这些 cookies。 + +要检查这些 cookies 是否存在,请打开**开发者工具** → **Application** → **Cookies**,然后选择网站域名。 + +![Application 选项卡中的 ssxmod_itna 和 ssxmod_itna2 cookies](./images/alibaba-task/alibaba-waf-cookies.png) + +如果网站使用 Alibaba WAF,且后续请求需要 cookies,请在创建任务时,在 `metadata` 对象中传递 `cookieRequired: true`。 + ## 创建任务的方法 ### 普通版本(无附加参数) @@ -459,7 +481,7 @@ Alibaba Punish 可能使用选择匹配图片或滑块等验证方式。 ### 返回 cookies 的选项(`cookieRequired`) -对于某些使用 **Alibaba WAF** 或 **Amazon WAF** 的网站,成功完成 CAPTCHA 识别后还需要获取 cookies,以便在后续请求中使用。 +对于某些使用 **Alibaba WAF** 的网站,成功完成 CAPTCHA 识别后还需要获取 cookies,以便在后续请求中使用。 为此,请在 `metadata` 对象中添加以下参数: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/alibaba-task/alibaba-waf-cookies.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/alibaba-task/alibaba-waf-cookies.png new file mode 100644 index 00000000..9ad5b5b0 Binary files /dev/null and b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/alibaba-task/alibaba-waf-cookies.png differ diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/alibaba-task/traceless.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/alibaba-task/traceless.png new file mode 100644 index 00000000..a6654674 Binary files /dev/null and b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/alibaba-task/traceless.png differ diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/tendi/aid-encrypted.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/tendi/aid-encrypted.png new file mode 100644 index 00000000..7c8194fb Binary files /dev/null and b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/tendi/aid-encrypted.png differ diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/tendi.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/tendi.mdx index dd0d6ef2..4ee0801a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/tendi.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/tendi.mdx @@ -64,6 +64,20 @@ CapMonster Cloud 默认通过内置代理工作——这些代理已包含在费 --- + + +此参数包含 Aid 值,需要在创建任务之前从目标网站获取。 + +示例:`HHuVfL451oAYXSwVa87xnU4QHER9ufsPpaSomCugX5Il/Nc2vLTu2dgoguMwmhAM` + +**重要**:并非所有网站都使用此参数。如果网站不返回 Aid,则无需传递 `aidEncrypted`。 + +`aidEncrypted` 的值**仅可使用一次**:每次创建新任务时,都必须获取新的 Aid。 + +详情请参阅[如何获取 aidEncrypted](#如何获取-aidencrypted)。 + +--- + 浏览器 User-Agent。请使用 CapMonster Cloud 当前支持的值:`userAgentPlaceholder`
@@ -102,6 +116,8 @@ CapMonster Cloud 默认通过内置代理工作——这些代理已包含在费 ## 创建任务方法 +如果网站使用 `aidEncrypted`,请将其放在 `metadata` 中传递。每次创建新任务时,都要从网站获取新的值。 + @@ -122,7 +138,7 @@ CapMonster Cloud 默认通过内置代理工作——这些代理已包含在费 "websiteKey": "your-website-key", "userAgent": "userAgentPlaceholder", "metadata": { - "captchaUrl": "https://global.captcha.example.com/TCaptcha-global.js" + "captchaUrl": "https://example.com/TCaptcha.js" } } } @@ -156,7 +172,7 @@ CapMonster Cloud 默认通过内置代理工作——这些代理已包含在费 "websiteKey": "your-website-key", "userAgent": "userAgentPlaceholder", "metadata": { - "captchaUrl": "https://global.captcha.example.com/TCaptcha-global.js" + "captchaUrl": "https://example.com/TCaptcha.js" }, "proxyType": "your-proxy-type", "proxyAddress": "your-proxy-address", @@ -230,6 +246,48 @@ CapMonster Cloud 默认通过内置代理工作——这些代理已包含在费 文件名中的 `*` 表示任意字符串或空字符串。例如,`TJNCaptcha*.js` 可以匹配 `TJNCaptcha.js` 或 `TJNCaptcha-global.js`。 +## 如何获取 aidEncrypted + +如果网站使用 Aid,请在创建任务之前通过单独的请求获取它,并将返回的值传递到 `metadata` 对象中的 `aidEncrypted` 参数。 + +打开**开发者工具**,转到 **Network** 选项卡并触发验证码。找到网站用于获取 Aid 的请求,然后从响应中复制该值。 + +请求 URL 示例: + +```text +https://example.com/path/GetCaptchaAid.ashx?_=1234567890000 +``` + +同一请求中也可能包含 `websiteKey`(`AppId`)的值。 + +![](./images/tendi/aid-encrypted.png) + +请求 URL 和响应格式取决于具体网站。 + +使用 `aidEncrypted` 参数创建任务的示例: + +```json +{ + "clientKey": "API_KEY", + "task": { + "type": "CustomTask", + "class": "TenDI", + "websiteURL": "https://example.com/page-with-captcha", + "websiteKey": "YOUR_WEBSITE_KEY", + "metadata": { + "captchaUrl": "https://example.com/TCaptcha.js", + "aidEncrypted": "YOUR_AID_ENCRYPTED" + } + } +} +``` + +:::warning 重要: + +每次创建任务之前,都要获取新的 Aid 值。请勿重复使用为上一任务获取的 `aidEncrypted` 值,也不要使用文档示例中的值。 + +::: + ## 如何查找任务创建所需的所有参数 ### 自动方法