Menu

GeeTest CAPTCHA 풀기

해당 유형의 작업은 작업자 브라우저에서 GeeTest CAPTCHA를 풉니다. 여기서 사용자의 앱은 웹사이트 주소, gt 키, 챌린지 키를 제출하며, 작업 완료 후 3개의 토큰으로 구성된 솔루션을 받습니다. 버전 GeeTest 버전 4의 경우, 출력값은 5개의 값으로 구성되며, 챌린지 키는 필요하지 않습니다.

프록시가 필요하지 않다는 점과 자체 IP 주소에서 푼다는 점을 제외하면 모든 부분이 GeeTestTask와 유사합니다.

GeeTest captcha example
GeeTest captcha example
GeeTest captcha example

Geetest Checkbox example
GeeTest captcha example
GeeTest captcha example
GeeTest captcha example
GeeTest captcha example
예제
v3
v4
Python
Node.js
Go
PHP
Java
C#
bash

Python에서 GeeTest v4을(를) 해결하는 방법

#pip3 install anticaptchaofficial

from anticaptchaofficial.geetestproxyless import *

solver = geetestProxyless()
solver.set_verbose(1)
solver.set_key("YOUR_API_KEY_HERE")
solver.set_website_url("https://address.com")
solver.set_gt_key("captchaId value")
solver.set_version(4)

# optional API subdomain, make sure you understand what to set here
# solver.set_js_api_domain("custom-domain.geetest.com")

# optional initialization parameters
# solver.set_init_parameters({"riskType": "slide"})

# 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("result tokens: ")
    print(token)
    # user-agent in case you need it:
    print("user-agent: "+solver.get_user_agent())
else:
    print("task finished with error "+solver.error_code)

Node.js에서 GeeTest v4을(를) 해결하는 방법

//npm install @antiadmin/anticaptchaofficial
//https://github.com/anti-captcha/anticaptcha-npm

const ac = require("@antiadmin/anticaptchaofficial");

ac.setAPIKey('YOUR_API_KEY_HERE');

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

ac.solveGeeTestV4Proxyless('http://DOMAIN.COM',
    'captchaId',
    'API_SUBDOMAIN',
    {
        "riskType": "slide"
    })
    .then(result => {
        console.log('result: ');
        console.log(result);
    })
    .catch(error => console.log('test received error '+error));

// in case you need it
console.log("worker's user-agent:");
console.log(ac.getUserAgent());

Go에서 GeeTest v4을(를) 해결하는 방법

// Install with:
// go get github.com/anti-captcha/anticaptcha-go
package main

import (
    "fmt"
    "github.com/anti-captcha/anticaptcha-go"
    "log"
)

func main() {
    // Create API client and set the API Key
    ac := anticaptcha.NewClient("API_KEY_HERE")

    // set to 'false' to turn off debug output
    ac.IsVerbose = true

    // Specify softId to earn 10% commission with your app.
    // Get your softId here: https://anti-captcha.com/clients/tools/devcenter
    //ac.SoftId = 1187

    // Make sure the API key funds balance is positive
    balance, err := ac.GetBalance()
    if err != nil {
        log.Fatal(err)
        // Exit program to make sure you don't DDoS API with requests, while having empty balance
        return
    }
    fmt.Println("Balance:", balance)

    //Solve Geetest v4 without proxy
    solution, err := ac.SolveGeeTest(anticaptcha.GeeTest{
        WebsiteURL: "https://bitget.com/",
        Gt:         "e9ca9c9ca19ad540a8017f5c107b2d0f",
        Version:    4,
        InitParameters: map[string]interface{}{
            "riskType": "slide",
        },
    })
    if err != nil {
        log.Fatal(err)
    }
    fmt.Println("Captcha Solution:", solution)
    // In case you need the worker's user-agent
    fmt.Println("User-Agent:", ac.WorkersUserAgent)
}

PHP에서 GeeTest v4을(를) 해결하는 방법

//git clone https://github.com/anti-captcha/anticaptcha-php.git

include("anticaptcha.php");
include("geetestproxyless.php");

$api = new GeeTestProxyless();
$api->setVerboseMode(true);
$api->setWebsiteURL("https://www.geetest.com/en/adaptive-captcha-demo");
$api->setGTKey("fcd636b4514bf7ac4143922550b3008b");
$api->setVersion(4);
$api->setInitParameters([
    "riskType": "slide"
]);
//optional API subdomain, make sure you understand what to set here
$api->setAPISubdomain("gcaptcha4.geetest.com");

//your anti-captcha.com account key
$api->setKey("YOUR_API_KEY_HERE");

//Specify softId to earn 10% commission with your app.
//Get your softId here: https://anti-captcha.com/clients/tools/devcenter
$api->setSoftId(0);

//create task in API
if (!$api->createTask()) {
    $api->debout("API v2 send failed - ".$api->getErrorMessage(), "red");
    return false;
}

$taskId = $api->getTaskId();

//wait in a loop for max 300 seconds till task is solved
if (!$api->waitForResult(300)) {
    echo "could not solve captcha\n";
    echo $api->getErrorMessage()."\n";
} else {

    echo "your geetest tokens:\n";
    print_r($api->getTaskSolution());
    echo "worker's user-agent in case you need it:\n";
    echo $api->getWorkersUserAgent()."\n";

}

Java에서 GeeTest v4을(를) 해결하는 방법

//git clone https://github.com/anti-captcha/anticaptcha-java.git

package com.anti_captcha;

import com.anti_captcha.Api.GeeTestProxyless;
import com.anti_captcha.Helper.DebugHelper;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.Iterator;
import java.util.concurrent.ThreadLocalRandom;

public class Main {

    public static void main(String[] args) throws InterruptedException, MalformedURLException, JSONException {
        DebugHelper.setVerboseMode(true);

        GeeTestProxyless api = new GeeTestV4Proxyless();
        api.setClientKey("YOUR_API_KEY_HERE");
        api.setWebsiteUrl(new URL("http://biletmaster.com/"));
        api.setWebsiteKey("be33de396f8d04030f6eca8fbd225071");

        // optional initial parameters
        JSONObject additionalInitParameters = new JSONObject();
        try {
            additionalInitParameters.put("riskType", "ai");
        } catch (Exception e) {
            DebugHelper.out("JSON error: "+e.getMessage(), DebugHelper.Type.ERROR);
            return;
        }
        api.setInitParameters(additionalInitParameters);

        //optional API subdomain, make sure you understand what to set here
        //api.setGeetestApiServerSubdomain("optional.subdomain.api.geetest.com");

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

        if (!api.createTask()) {
            DebugHelper.out(
                    "API v2 send failed. " + api.getErrorMessage(),
                    DebugHelper.Type.ERROR
            );
        } else if (!api.waitForResult()) {
            DebugHelper.out("Could not solve the captcha.", DebugHelper.Type.ERROR);
        } else {
            DebugHelper.out("Result captcha_id: " + api.getTaskSolution().getCaptchaId(), DebugHelper.Type.SUCCESS);
            DebugHelper.out("Result lot_number: " + api.getTaskSolution().getLotNumber(), DebugHelper.Type.SUCCESS);
            DebugHelper.out("Result pass_token: " + api.getTaskSolution().getPassToken(), DebugHelper.Type.SUCCESS);
            DebugHelper.out("Result gen_time: " + api.getTaskSolution().getGenTime(), DebugHelper.Type.SUCCESS);
            DebugHelper.out("Result captcha_output: " + api.getTaskSolution().getCaptchaOutput(), DebugHelper.Type.SUCCESS);
        }
    }

}

C#에서 GeeTest v4을(를) 해결하는 방법

//git clone https://github.com/anti-captcha/anticaptcha-csharp.git

using System;
using Anticaptcha_example.Api;
using Anticaptcha_example.Helper;
using Newtonsoft.Json.Linq;

namespace Anticaptcha_example
{
    internal class Program
    {
        private static void Main() {

            DebugHelper.VerboseMode = true;

            var api = new GeeTestV4Proxyless()
            {
                ClientKey = ClientKey,
                WebsiteUrl = new Uri("http://www.supremenewyork.com"),
                WebsiteKey = "b6e21f90a91a3c2d4a31fe84e10d0442",

                // Specify softId to earn 10% commission with your app.
                // Get your softId here:
                // https://anti-captcha.com/clients/tools/devcenter
                SoftId = 0
            };

            api.initParameters.Add("riskType", "slide");

            if (!api.CreateTask())
                DebugHelper.Out("API v2 send failed. " + api.ErrorMessage, DebugHelper.Type.Error);
            else if (!api.WaitForResult())
                DebugHelper.Out("Could not solve the captcha.", DebugHelper.Type.Error);
            else
            {
                DebugHelper.Out("Result CaptchaId: " + api.GetTaskSolution().CaptchaId, DebugHelper.Type.Success);
                DebugHelper.Out("Result LotNumber: " + api.GetTaskSolution().LotNumber, DebugHelper.Type.Success);
                DebugHelper.Out("Result PassToken: " + api.GetTaskSolution().PassToken, DebugHelper.Type.Success);
                DebugHelper.Out("Result GenTime: " + api.GetTaskSolution().GenTime, DebugHelper.Type.Success);
                DebugHelper.Out("Result CaptchaOutput: " + api.GetTaskSolution().CaptchaOutput, DebugHelper.Type.Success);
            }

        }
    }
}

bash에서 GeeTest v4을(를) 해결하는 방법

curl -i -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -X POST -d '{
    "clientKey":"YOUR_API_KEY_HERE",
    "task":
        {
            "type":"GeeTestTaskProxyless",
            "websiteURL":"http://mywebsite.com/geetest/test.php",
            "gt":"874703612e5cac182812a00e273aad0d",
            "version":4,
            "initParameters": {
              "riskType": "slide"
            }
        },
    "softId": 0
}' https://api.anti-captcha.com/createTask

작업 객체

속성 유형 필수 목적
type 문자열 GeeTestTaskProxyless
websiteURL 문자열 대상 웹페이지 주소. 회원 영역을 포함하여 웹사이트의 어느 곳에나 위치할 수 있습니다. 당사의 작업자는 해당 페이지를 탐색하지는 않으나, 대신에 해당 페이지의 방문 시뮬레이션합니다.
gt 문자열 도메인 공개 키 (거의 업데이트되지 않음)
challenge 문자열 아니요 토큰 키 변경. 각 CAPTCHA에 대한 새 키를 가져오기 하여야 하며, 그렇지 않은 경우에는 오류 작업에 비용이 청구됩니다. 버전 3의 경우에는 필수이나, 버전 4에는 필요하지 않습니다.
geetestApiServerSubdomain 문자열 아니요 선택 API 하위 도메인. 일부 구현에 필요할 수 있습니다.
GeeTest V3 example
version 정수 아니요 버전 번호. 기본 버전은 3입니다. 지원 버전: 3, 4.
initParameters 객체 아니요 버전 4에 대한 추가 초기화 매개변수
v3
v4

작업 솔루션 객체

속성 유형 목적
captcha_id 문자열 복합 토큰의 일부
lot_number 문자열 복합 토큰의 일부
pass_token 문자열 복합 토큰의 일부
gen_time 정수 복합 토큰의 일부
captcha_output 문자열 복합 토큰의 일부
userAgent 문자열 작업자 브라우저의 사용자 에이전트. 응답 토큰을 제출할 때 사용합니다.

응답 예제

{
    "errorId":0,
    "status":"ready",
    "solution":
    {
        "captcha_id": "fcd636b4514bf7ac4143922550b3008b",
        "lot_number": "354ab6dd4e594fdc903074c4d8d37b24",
        "pass_token": "b645946a654e60218c7922b74b3b5ee8e8717e8fd3cd5182a5c98d660bbd1ed5",
        "gen_time": "1649921519",
        "captcha_output": "cFPIALDXSop8Ri2mPABbRWzNBs86N8D4vNUTuVa7wN7E...[cut]...ciM50ePCCzLBZ1bmaV9Yt7IkkFI9Emx4eaP8rRoA==",
        "userAgent":"Mozilla\5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/145.0.0.0 Safari\/537.36"
    },
    "cost":"0.001500",
    "ip":"46.98.54.221",
    "createTime":1472205564,
    "endTime":1472205570,
    "solveCount":"0"
}