Arkose Labs captcha (FunCaptcha)绕过API服务
您需要在使用Arkose Labs FunCaptcha的页面上找到两个值
公钥
服务URL(surl)
公钥可以在funcaptcha
div
单元的data-pkey
参数中找到,也可以在名为fc-token
的input
单元中找到 - 只需从该单元的值中提取pk
后面指示的密钥。服务Url也可以在
fc-token
中找到 - 它是一个surl
参数值。服务Url是可选参数,如果您不提供,我们将使用在大多数情况下都有效的默认值,但我们建议您提供。
向我们的API URL:
http://2captcha.com/in.php
提交HTTPGET
或POST
请求,方式设置为funcaptcha
;提供在上一步中找到的值作为publickey
和surl
参数,并将整页URL作为pageurl
值。您可以在下表中找到完整的参数列表。请求URL示例 ->
http://2captcha.com/in.php?key=1abc234de56fab7c89012d34e56fa7b8&method=funcaptcha&publickey=12AB34CD-56F7-AB8C-9D01-2EF3456789A0&surl=https://client-api.arkoselabs.com&pageurl=http://mysite.com/page/with/funcaptcha/
如果一切正常,服务器将以纯文本返回您的captcha
ID
,比如:OK|2122988149
,或者如果使用json参数,则以JSON{"status":1,"request":"2122988149"}
返回。暂停10-20秒,然后向我们的API URL:
http://2captcha.com/res.php
提交HTTPGET
请求以获取结果。 完整的参数列表如下表所示。如果captcha已经处理,服务器将以纯文本或JSON响应,并返回如下所示的答案令牌 ->
如果captcha未处理,服务器将返回
CAPCHA_NOT_READY
结果。 在5秒内重复您的请求。如果出现问题,服务器将返回错误代码。
3084f4a302b176cd7.96368058|r=ap-southeast-1|guitextcolor=%23FDD531|metabgclr=%23FFFFFF|metaiconclr=%23202122|meta=3|lang=en|pk=12AB34CD-56F7-AB8C-9D01-2EF3456789A0|cdn_url=https://cdn.funcaptcha.com/fc|surl=https://funcaptcha.com
找到id带有
fc-token
的单元并将令牌放入此单元的值中。在网站上做你需要做的其他事情:提交表格、点击按钮或其他。
代码示例:
阅读更多 - API文档。
// https://github.com/2captcha/2captcha-php require(__DIR__ . '/../src/autoloader.php'); $solver = new \TwoCaptcha\TwoCaptcha('YOUR_API_KEY'); try { $result = $solver->funcaptcha([ 'sitekey' => '69A21A01-CC7B-B9C6-0F9A-E7FA06677FFC', 'url' => 'https://mysite.com/page/with/funcaptcha', ]); } catch (\Exception $e) { die($e->getMessage()); } die('Captcha solved: ' . $result->code);
# https://github.com/2captcha/2captcha-python import sys import os sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) from twocaptcha import TwoCaptcha api_key = 'YOUR_API_KEY' solver = TwoCaptcha(api_key) try: result = solver.funcaptcha(sitekey='69A21A01-CC7B-B9C6-0F9A-E7FA06677FFC', url='https://mysite.com/page/with/funcaptcha', surl='https://client-api.arkoselabs.com') except Exception as e: sys.exit(e) else: sys.exit('result: ' + str(result))
// https://github.com/2captcha/2captcha-csharp using System; using System.Linq; using TwoCaptcha.Captcha; namespace TwoCaptcha.Examples { public class FunCaptchaExample { public void Main() { TwoCaptcha solver = new TwoCaptcha("YOUR_API_KEY"); FunCaptcha captcha = new FunCaptcha(); captcha.SetSiteKey("69A21A01-CC7B-B9C6-0F9A-E7FA06677FFC"); captcha.SetUrl("https://mysite.com/page/with/funcaptcha"); try { solver.Solve(captcha).Wait(); Console.WriteLine("Captcha solved: " + captcha.Code); } catch (AggregateException e) { Console.WriteLine("Error occurred: " + e.InnerExceptions.First().Message); } } } }
// https://github.com/2captcha/2captcha-java package examples; import com.twocaptcha.TwoCaptcha; import com.twocaptcha.captcha.FunCaptcha; public class FunCaptchaExample { public static void main(String[] args) { TwoCaptcha solver = new TwoCaptcha("YOUR_API_KEY"); FunCaptcha captcha = new FunCaptcha(); captcha.setSiteKey("69A21A01-CC7B-B9C6-0F9A-E7FA06677FFC"); captcha.setUrl("https://mysite.com/page/with/funcaptcha"); try { solver.solve(captcha); System.out.println("Captcha solved: " + captcha.getCode()); } catch (Exception e) { System.out.println("Error occurred: " + e.getMessage()); } } }
// https://github.com/2captcha/2captcha-go package main import ( "fmt" "log" "github.com/2captcha/2captcha-go" ) func main() { client := api2captcha.NewClient("API_KEY") captcha := api2captcha.FunCaptcha{ SiteKey: "69A21A01-CC7B-B9C6-0F9A-E7FA06677FFC", Url: "https://mysite.com/page/with/funcaptcha", Surl: "https://client-api.arkoselabs.com", Data: map[string]string{"anyKey":"anyValue"}, } code, err := client.Solve(captcha.ToRequest()) if err != nil { log.Fatal(err); } fmt.Println("code "+code) }
// https://github.com/2captcha/2captcha-cpp #include <cstdio> #include "curl_http.hpp" #include "api2captcha.hpp" int main (int ac, char ** av) { api2captcha::curl_http_t http; http.set_verbose (true); api2captcha::client_t client; client.set_http_client (&http); client.set_api_key (API_KEY); api2captcha::funcaptcha_t captcha; captcha.set_site_key ("69A21A01-CC7B-B9C6-0F9A-E7FA06677FFC"); captcha.set_url ("https://mysite.com/page/with/funcaptcha"); captcha.set_surl ("https://client-api.arkoselabs.com"); try { client.solve (cap); printf ("code '%s'\n", cap.code ().c_str ()); } catch (std::exception & e) { fprintf (stderr, "Failed: %s\n", e.what ()); } return 0; }
require 'api_2captcha' client = Api2Captcha.new("YOUR_API_KEY") result = client.funcaptcha({ publickey: "69A21A01-CC7B-B9C6-0F9A-E7FA06677FFC", pageurl: "https://mysite.com/page/with/funcaptcha", surl: "https://client-api.arkoselabs.com" })