Cloudflare · 在线演示

Cloudflare Turnstile 演示

来自 Cloudflare 的隐私优先、无验证码挑战小组件。

  • 免费,无需注册
  • 真实提供商的小组件
  • 查看验证响应

实时 Cloudflare Turnstile 小组件

Cloudflare 挑战

标准 Turnstile 小组件。完成后按“校验”进行验证。

如何识别 Cloudflare Turnstile

上方的方框是一个实时的 Cloudflare Turnstile 挑战。本页面展示三种简单方式来识别 Cloudflare Turnstile 并获取有效的 cf-turnstile-response token:使用 CapSkip 浏览器扩展自动识别、用 CapSkip SDK 在你自己的代码中识别,或将你的工具已经调用的验证码服务重新路由到 CapSkip。CapSkip 是一款快速、无限量的 Cloudflare Turnstile 识别工具,在你的设备上本地运行,因此没有按次付费,也没有任何数据离开你的机器。

无需代码

方式一:使用浏览器扩展识别 Cloudflare Turnstile

绕过 Cloudflare Turnstile 最简单的方式是 CapSkip 验证码识别扩展 适用于 Chrome 和 Firefox。它会检测任意页面上的 Turnstile 小组件并在后台自动识别,无需编写代码,也无需复制 token。

1

安装扩展

从 Chrome 应用商店或 Firefox 附加组件添加 CapSkip。它同样适用于 Brave、Edge、Opera 和 Vivaldi。

2

运行 CapSkip 应用

安装并打开 CapSkip 桌面应用。它在你自己的设备上完成识别,并与扩展配对。

3

它会自动识别

重新加载本页面,CapSkip 就会为你通过 Turnstile。希望自己掌控?随时可切换到手动模式。

面向开发者

方式二:使用 CapSkip SDK 识别 Cloudflare Turnstile

在构建自动化、爬虫或机器人?使用 CapSkip 验证码识别 SDK 来识别 Cloudflare Turnstile,支持 Python, Node.js, PHPC#。你传入本页面的 site key 和 URL,CapSkip 就会返回一个全新的 Turnstile token,你可以像真实 token 一样提交它。

网站密钥(Site key)
0x4AAAAAADogn3t3_JKwKkgS
页面 URL
https://capskip.com/zh/captcha-demo/cloudflare-turnstile/

开始之前

CapSkip 在本地识别。下载并运行 CapSkip 桌面应用 并让它在后台保持打开。SDK 通过 127.0.0.1:8080与它通信,因此没有云端调用,也没有按次费用。

1

安装 SDK

将官方 CapSkip 客户端添加到你的项目中。

pip install capskip
npm install capskip
composer require capskip/capskip
dotnet add package CapSkip
2

识别 Turnstile 并获取 token

传入本页的 sitekeyurl 设置为 turnstile()。CapSkip 会返回一个新的 cf-turnstile-response token。

from capskip import CapSkip

# Connect to the CapSkip app running on your machine
solver = CapSkip(host="127.0.0.1", port=8080)

# Solve the Turnstile shown on this page
result = solver.turnstile(
    sitekey="0x4AAAAAADogn3t3_JKwKkgS",
    url="https://capskip.com/zh/captcha-demo/cloudflare-turnstile/",
)

token = result["code"]   # the cf-turnstile-response token
print(token)
const { CapSkip } = require('capskip');

// Connect to the CapSkip app running on your machine
const solver = new CapSkip({ host: '127.0.0.1', port: 8080 });

(async () => {
  // Solve the Turnstile shown on this page
  const result = await solver.turnstile(
    '0x4AAAAAADogn3t3_JKwKkgS',
    'https://capskip.com/zh/captcha-demo/cloudflare-turnstile/',
  );

  const token = result.code; // the cf-turnstile-response token
  console.log(token);
})();
<?php
require 'vendor/autoload.php';

use CapSkip\CapSkip;

// Connect to the CapSkip app running on your machine
$solver = new CapSkip(['host' => '127.0.0.1', 'port' => 8080]);

// Solve the Turnstile shown on this page
$result = $solver->turnstile(
    '0x4AAAAAADogn3t3_JKwKkgS',
    'https://capskip.com/zh/captcha-demo/cloudflare-turnstile/'
);

$token = $result['code']; // the cf-turnstile-response token
echo $token;
using CapSkip;

// Connect to the CapSkip app running on your machine
var solver = new CapSkipClient(host: "127.0.0.1", port: 8080);

// Solve the Turnstile shown on this page
var result = await solver.TurnstileAsync(
    "0x4AAAAAADogn3t3_JKwKkgS",
    "https://capskip.com/zh/captcha-demo/cloudflare-turnstile/");

string token = result.Code; // the cf-turnstile-response token
Console.WriteLine(token);

你会得到一个很长的 token,它以 1. 开头,对该 site key 有效,可直接提交。

3

使用 token

将 token 放入小组件隐藏的 cf-turnstile-response 字段中。有些页面也会从 g-recaptcha-response读取它。如果在 turnstile.render() 配置中定义了回调,则用该 token 运行它。然后提交表单,你的服务器会通过 Cloudflare siteverify 进行验证。请注意, 校验 本页面上的按钮会直接用 turnstile.getResponse()从小组件读取 token,因此它验证的是小组件自身的 token,而不是你放入字段中的 token。

// 1. Drop the solved token into the Turnstile response field
document.querySelector('[name="cf-turnstile-response"]').value = token;

// Some implementations also read it from g-recaptcha-response:
// document.querySelector('[name="g-recaptcha-response"]').value = token;

// 2. If a callback was defined in turnstile.render(), run it with the token
if (window.tsCallback) window.tsCallback(token);

// 3. ...then submit your form.
高级

Cloudflare Challenge 页面上的 Turnstile

有些站点完全置于 Cloudflare 之后,会在内容加载之前显示一个 Turnstile 挑战页面。这里你同样需要从 turnstile.render(): cData, chlPageDataaction获取三个值。然后你用 CapSkip 返回的完全相同的 User-Agent 提交 token。

1. 拦截参数(在 Turnstile 加载之前注入这段代码)

// Override turnstile.render to capture the challenge parameters
const i = setInterval(() => {
  if (window.turnstile) {
    clearInterval(i);
    window.turnstile.render = (container, params) => {
      window.tsParams = {
        sitekey: params.sitekey,
        pageurl: window.location.href,
        data: params.cData,
        pagedata: params.chlPageData,
        action: params.action,
      };
      window.tsCallback = params.callback; // call this with the solved token
      console.log(JSON.stringify(window.tsParams));
      return 'foo';
    };
  }
}, 50);

2. 使用捕获的值进行识别,然后复用返回的 User-Agent

result = solver.turnstile(
    sitekey="0x4AAAA...",          # params.sitekey
    url="https://the-protected-site.com/",
    data="init_data...",           # params.cData
    pagedata="chl_page_data...",   # params.chlPageData
)

token = result["code"]
user_agent = result["userAgent"]   # submit the token with this exact User-Agent
const result = await solver.turnstile(
  '0x4AAAA...',                     // params.sitekey
  'https://the-protected-site.com/',
  { data: 'init_data...', pagedata: 'chl_page_data...' },
);

const token = result.code;
const userAgent = result.userAgent; // submit the token with this exact User-Agent
$result = $solver->turnstile(
    '0x4AAAA...',                     // params.sitekey
    'https://the-protected-site.com/',
    ['data' => 'init_data...', 'pagedata' => 'chl_page_data...']
);

$token = $result['code'];
$userAgent = $result['userAgent']; // submit the token with this exact User-Agent
var result = await solver.TurnstileAsync(
    "0x4AAAA...",                     // params.sitekey
    "https://the-protected-site.com/",
    new Dictionary<string, object?> { ["data"] = "init_data...", ["pagedata"] = "chl_page_data..." });

string token = result.Code;
string userAgent = result.UserAgent; // submit the token with this exact User-Agent

原始 HTTP API 还接受一个可选的 action 值和一个 proxy,这在站点检查 token 是否从你自己的 IP 生成时很有用。

不使用 Python、Node.js、PHP 或 C#?这些 SDK 只是 CapSkip HTTP API 的封装(即标准的 由以下端点返回的验证码 ID: / res.php 端点),因此你可以从 任何语言、框架或工具识别 reCAPTCHA v2。参见 Turnstile API 参考.

无需改动代码

选项 3:将你现有的识别服务代码发送到 CapSkip

已经在通过按次付费的验证码服务(例如 2Captcha, Anti-CaptchaCapMonster)识别基于回调的 reCAPTCHA v2?你无需重写一行代码。CapSkip 应用包含一个 服务模拟器 ,它在本地讲这些服务自己的 API:选择你使用的服务,点击 添加到 hosts 文件,你的机器人、爬虫或现成工具已经发送给它的每个请求,都会由 CapSkip 在你自己的机器上响应,采用统一价格而非按次账单。

1

选择你的服务

打开 CapSkip 应用,选择你的代码已经在对接的服务:2Captcha、RuCaptcha、Anti-Captcha、CapMonster Cloud、CapSolver、DeathByCaptcha、SolveCaptcha 或 Captchas.io。

2

添加到 hosts 文件

在应用中一键将该服务的域名指向 CapSkip,于是你的工具发出的调用会在你自己的机器上得到响应,而不是发往付费 API。

3

原样运行你的工具

相同的 API key、相同的请求、相同的轮询循环。CapSkip 以该服务自身的格式回复,你的代码会得到一个有效的 cf-turnstile-response token。

切换后,下面的内容不会有任何变化。这与你的代码今天发出的调用完全相同,只不过现在 Cloudflare Turnstile 在本地识别,并且一个有效的 cf-turnstile-response token 会从 CapSkip 返回:

POST https://2captcha.com/in.php
     key=YOUR_EXISTING_API_KEY
     method=turnstile
     sitekey=0x4AAAAAADogn3t3_JKwKkgS
     pageurl=https://capskip.com/zh/captcha-demo/cloudflare-turnstile/

GET  https://2captcha.com/res.php?key=YOUR_EXISTING_API_KEY&action=get&id=2122988149
     OK|0.sBQmB…  the cf-turnstile-response token, solved by CapSkip

客户端库同样如此:Anti-Captcha 风格的 createTask / getTaskResult 配对,或任何基于这些服务构建的封装,在模拟器开启后都能继续工作。完整的请求和响应参考见 CapSkip API 文档.

关于本 Cloudflare Turnstile 演示

本页是一个实时的 Cloudflare Turnstile 演示 在这里你可以测试 Cloudflare Turnstile 的工作原理,并实时观看它被识别的过程。Turnstile 是 Cloudflare 推出的现代验证码,也是 reCAPTCHA 的替代方案,它通过浏览器和行为信号来验证访问者,通常无需点击任何谜题。用它来探索 Turnstile token 的生成、 cf-turnstile-response 值,以及网站用来保护表单、登录和注册免受垃圾信息、滥用和机器人侵害的验证流程。

开发者、测试人员和自动化工程师可以使用这个 Cloudflare Turnstile 测试页面来检查集成、验证配置,并对 CapSkip 识别 Turnstile 的速度进行基准测试。无论你需要识别一次 Cloudflare Turnstile 还是自动化数千次识别,CapSkip 都是一款 Cloudflare Turnstile 识别 ,它有三种工作方式:面向 Chrome 和 Firefox 的免代码 验证码识别扩展 ,面向 Python、Node.js、PHP 和 C# 的 验证码识别 SDK ,以及对你今天可能按次付费的验证码服务的即插即用模拟,全部以统一价格无限量识别。三者都由同一个桌面 AI 验证码识别工具驱动,安装一次即可在你自己的机器上运行,因此没有任何内容在远程服务器排队,也没有任何按次计费。

我可以保留现有的 2Captcha 或 Anti-Captcha 代码吗?
可以。CapSkip 应用模拟以下服务的 API: 2Captcha, RuCaptcha, Anti-Captcha, CapMonster Cloud, CapSolver, DeathByCaptchaSolveCaptcha。在应用中选择你的服务,点击“添加到 hosts 文件”,你的代码已经发送的请求就会由 CapSkip 在本地识别,无需改动代码,也无按次费用。
我如何识别 Cloudflare Turnstile?
安装 CapSkip 扩展SDK,运行 CapSkip 桌面应用,CapSkip 就会为小组件返回一个有效的 cf-turnstile-response token。扩展会在页面上自动识别 Turnstile,而 SDK 让你可以在自己的代码中识别 Cloudflare Turnstile。
Cloudflare Turnstile 可以被绕过吗?
可以。CapSkip 是一款 Cloudflare Turnstile 识别工具,能够通过标准 Turnstile 小组件和完整的 Cloudflare 挑战页面,然后向你提供一个可像真实访问者一样提交的 token。
CapSkip 识别 Turnstile 有多快?
一旦挑战通过,CapSkip 通常会在几秒钟内返回一个 Turnstile token。每次识别都在你自己的设备上本地运行,因此不会有任何任务在远程服务器上排队。
我可以将 CapSkip 与其他编程语言一起使用吗?
是的。除了 Python、Node.js、PHP 和 C# SDK 之外,CapSkip 还提供标准的 HTTP API,因此你可以用任意语言、框架或工具识别 Cloudflare Turnstile。请参阅 Turnstile API 参考.
CapSkip 是免费的 Cloudflare Turnstile 识别工具吗?
扩展可免费安装,1 美元试用可让你完整使用 7 天并识别 1,000 次。付费授权以统一价格解锁无限量识别,无按验证码费用。