Menu

자동으로 Google reCAPTCHA 풀기

해당 유형의 작업을 사용하면 Google 서비스에서의 reCAPTCHA를 풀 수 있습니다. 다른 모든 경우에 RecaptchaV2TaskProxyless를 사용하여 프록시 오프 모드에서 reCAPTCHA를 해결할 수 있습니다. Google API의 경우, 웹사이트 소유자에게 솔버의 IP를 공개하지 않습니다.

당사의 문제 해결 시스템은 작업자의 브라우저가 사용자의 프록시 서버에 액세스할 수 없도록 구축되어 있으며, 이 데이터는 당사의 서버에 저장되어 작업이 완료되는 즉시 삭제됩니다. 작업자의 컴퓨터는 당사의 서버와만 상호작용을 하며, 오직 하나의 IP 주소만 사용자의 프록시에 액세스합니다.

해당 유형의 작업을 실행하기에 앞서, 당사의 프록시 검사기가 일련의 테스트 요청을 통해 프록시의 호환성을 테스트하는 경우가 있을 수 있습니다. 해당 테스트 요청이 실패하는 경우, 사용자의 작업은 ERROR_PROXY_CONNECT_TIMEOUT 또는 이와 유사한 오류로 표시되어 취소됩니다. 해당 해결 프로세스가 진행되는 동안, 사용자의 프록시가 실패하여 당사의 API가 다른 프록시 오류를 생성하는 경우가 발생할 수 있습니다.

Recaptcha V2 funny example
Recaptcha V2 checkbox
reCAPTCHA V2 예제
Python
Node.js
Go
PHP
Java
C#
bash

Python에서 reCaptcha V2 proxy-on을(를) 해결하는 방법

#pip3 install anticaptchaofficial

from anticaptchaofficial.recaptchav2proxyon import *

solver = recaptchaV2Proxyon()
solver.set_verbose(1)
solver.set_key("YOUR_KEY")
solver.set_website_url("https://website.com")
solver.set_website_key("SITE_KEY")
#set optional custom parameter which Google made for their search page Recaptcha v2
#solver.set_data_s('"data-s" token from Google Search results "protection"')

# DO NOT USE PURCHASED/RENTED PROXIES ON PROXY SERVICES!!!
# THEY WILL NOT WORK!
# USE ONLY PROXIES YOU INSTALL YOURSELF ON YOUR OWN SERVER OR FAST VPS
# USE PROPER PROXY SOFTWARE LIKE SQUID !
# INSTALLATION INSTRUCTIONS:
# https://anti-captcha.com/apidoc/articles/how-to-install-squid
solver.set_proxy_address("PROXY_ADDRESS")
solver.set_proxy_port(1234)
solver.set_proxy_login("proxylogin")
solver.set_proxy_password("proxypassword")
solver.set_user_agent("Mozilla/5.0")
solver.set_cookies("test=true")

# 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)

g_response = solver.solve_and_return_solution()
if g_response != 0:
    print("g-response: "+g_response)
    # 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에서 reCaptcha V2 proxy-on을(를) 해결하는 방법

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

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

//set API key
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);

//set optional custom parameter which Google made for their search page Recaptcha v2
//ac.settings.recaptchaDataSValue = '"data-s" token from Google Search results "protection"'

ac.solveRecaptchaV2ProxyOn('http://DOMAIN.COM',
    'WEBSITE_KEY',
    'http', //http, socks4, socks5
    'PROXY_ADDRESS',
    'PROXY_PORT',
    'PROXY_LOGIN',
    'PROXY_PASSWORD',
    'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116',
    'some=cookies')
    .then(gresponse => {
        console.log('g-response: '+gresponse);
        console.log('google cookies:');
        console.log(ac.getCookies());
    })
    .catch(error => console.log('test received error '+error));

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

Go에서 reCaptcha V2 proxy-on을(를) 해결하는 방법

// 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 Recaptcha V2 with proxy
    solution, err := ac.SolveRecaptchaV2ProxyOn(anticaptcha.RecaptchaV2{
        WebsiteURL:  "https://huev.com/",
        WebsiteKey:  "6Lcyu8UZAAAAACwSh6Xf58WrNXTu0LLu4F85xf20",
        IsInvisible: false, // Set to 'true' if you are solving an invisible Recaptcha V2
        DataSValue:  "",    // Fill this value if you are solving a ReCaptcha V2 with the 'data-s' parameter, typically found at google.com websites
        UserAgent:   "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3",
        Proxy: &anticaptcha.Proxy{
            Type:      "http",
            IPAddress: "1.2.3.4",
            Port:      1234,
            Login:     "login-optional",
            Password:  "pass-optional",
        },
    })
    if err != nil {
        log.Fatal(err)
    }
    fmt.Println("Recaptcha g-response token:", solution)
    // In case you need the worker's user-agent
    fmt.Println("User-Agent:", ac.WorkersUserAgent)
}

PHP에서 reCaptcha V2 proxy-on을(를) 해결하는 방법

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

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

$api = new RecaptchaV2();
$api->setVerboseMode(true);

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

//target website address
$api->setWebsiteURL("http://makeawebsitehub.com/recaptcha/test.php");

//recaptcha key from target website
$api->setWebsiteKey("6LfI9IsUAAAAAKuvopU0hfY8pWADfR_mogXokIIZ");

//optional custom parameter which Google made for their search page Recaptcha v2
//$api->setDataSValue("'data-s' token from Google Search");

//proxy access parameters
// DO NOT USE PURCHASED/RENTED PROXIES ON PROXY SERVICES!!!
// THEY WILL NOT WORK!
// USE ONLY PROXIES YOU INSTALL YOURSELF ON YOUR OWN SERVER OR FAST VPS
// USE PROPER PROXY SOFTWARE LIKE SQUID !
// INSTALLATION INSTRUCTIONS:
// https://anti-captcha.com/apidoc/articles/how-to-install-squid
$api->setProxyType("http");
$api->setProxyAddress("8.8.8.8");
$api->setProxyPort(1234);
//optional login and password
$api->setProxyLogin("login");
$api->setProxyPassword("password");

//browser header parameters
$api->setUserAgent("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116");

//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 {

    $gResponse    =   $api->getTaskSolution();
    echo "\n";
    echo "your recaptcha token: $gResponse\n\n";
    echo "worker's user-agent in case you need it:\n";
    echo $api->getWorkersUserAgent()."\n";

}

Java에서 reCaptcha V2 proxy-on을(를) 해결하는 방법

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

package com.anti_captcha;

import com.anti_captcha.Api.RecaptchaV2;
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);

        RecaptchaV2 api = new RecaptchaV2();
        api.setClientKey("API_KEY_HERE");
        api.setWebsiteUrl(new URL("http://makeawebsitehub.com/recaptcha/test.php"));
        api.setWebsiteKey("6LfI9IsUAAAAAKuvopU0hfY8pWADfR_mogXokIIZ");

        api.setUserAgent("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 " +
                        "(KHTML, like Gecko) Chrome/52.0.2743.116");

        // proxy access parameters
        // DO NOT USE PURCHASED/RENTED PROXIES WITH PROXY SERVICES!!!
        // THEY WILL NOT WORK!
        // USE ONLY PROXIES YOU INSTALL YOURSELF ON YOUR OWN SERVER OR FAST VPS
        // USE PROPER PROXY SOFTWARE LIKE SQUID !
        // INSTALLATION INSTRUCTIONS:
        // https://anti-captcha.com/apidoc/articles/how-to-install-squid
        api.setProxyType(NoCaptcha.ProxyTypeOption.HTTP);
        api.setProxyAddress("xx.xxx.xx.xx");
        api.setProxyPort(8282);
        api.setProxyLogin("login");
        api.setProxyPassword("password");

        //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: " + api.getTaskSolution().getGRecaptchaResponse(), DebugHelper.Type.SUCCESS);
        }
    }
}

C#에서 reCaptcha V2 proxy-on을(를) 해결하는 방법

//git clone https://github.com/anti-captcha/sup/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 RecaptchaV2
            {
                ClientKey = "YOUR_API_KEY_HERE",
                WebsiteUrl = new Uri("http://makeawebsitehub.com/recaptcha/test.php"),
                WebsiteKey = "6LfI9IsUAAAAAKuvopU0hfY8pWADfR_mogXokIIZ",
                ProxyAddress = "xxx.xx.xx.xx",
                ProxyPort = 1234,
                ProxyLogin = "login",
                ProxyPassword = "password",
                UserAgent = "Opera 6.0",
                // Specify softId to earn 10% commission with your app.
                // Get your softId here:
                // https://anti-captcha.com/clients/tools/devcenter
                SoftId = 0
            };

            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: " + api.GetTaskSolution().GRecaptchaResponse, DebugHelper.Type.Success);

        }
    }
}

bash에서 reCaptcha V2 proxy-on을(를) 해결하는 방법

curl -i -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -X POST -d '{
    "clientKey":"YOUR_API_KEY_HERE",
    "task":
        {
            "type":"RecaptchaV2Task",
            "websiteURL":"http://mywebsite.com/recaptcha/test.php",
            "websiteKey":"6Lc_aCMTAAAAABx7u2N0D1XnVbI_v6ZdbM6rYf16",
            "proxyType":"http",
            "proxyAddress":"8.8.8.8",
            "proxyPort":8080,
            "proxyLogin":"proxyLoginHere",
            "proxyPassword":"proxyPasswordHere",
            "userAgent":"MODERN_USER_AGENT_HERE",
            "cookie":"cookiename1=cookievalue1; cookiename2=cookievalue2"
        },
    "softId": 0
}' https://api.anti-captcha.com/createTask

작업 객체

속성 유형 필수 목적
type 문자열 RecaptchaV2Task
이전 작업명: 'NoCaptchaTask'. 당사는 코드를 업데이트할 필요 없이 이전 작업명을 영구적으로 지원할 예정입니다.
websiteURL 문자열 대상 웹페이지 주소. 회원 영역을 포함하여 웹사이트의 어느 곳에나 위치할 수 있습니다. 당사의 작업자는 해당 페이지를 탐색하지는 않으나, 대신에 해당 페이지의 방문 시뮬레이션합니다.
websiteKey 문자열 reCAPTCHA 웹사이트 키. 해당 키를 찾는 방법의 경우, 해당 글을 참고하시기 바랍니다.
recaptchaDataSValue 문자열 아니요 'data-s' 매개변값. Google 웹사이트의 reCAPTCHA에만 적용됩니다.
proxyType 문자열 프록시 유형
http - 일반적인 http/https 프록시
socks4 - socks4 프록시
socks5 - socks5 프록시
proxyAddress 문자열 프록시 IP 주소 ipv4/ipv6. 로컬 네트워크의 호스트명이나 IP 주소는 필요 없습니다.
proxyPort 정수 프록시 포트
proxyLogin 문자열 아니요 인증이 필요한 프록시 로그인 (기본)
proxyPassword 문자열 아니요 프록시 비밀번호
userAgent 문자열 에뮬레이션에 사용되는 브라우저의 사용자 에이전트. 최신 브라우저의 서명을 사용해야 하며, 그렇지 않은 경우에는 Google에서 "update your browser"를 요청합니다.
cookies 문자열 아니요 Google 도메인에서 사용해야 하는 추가 쿠키.
isInvisible 불린 아니요 reCAPTCHA의 invisible 여부를 지정하며, 이를 통해 작업자를 위한 적절한 위젯을 렌더링할 수 있습니다.

작업 솔루션 객체

속성 유형 목적
gRecaptchaResponse 문자열 대상 웹사이트의 제출 양식과 상호작용하는 데 필요한 토큰 문자열.
cookies 배열 reCAPTCHA를 푸는 데 사용되는 쿠키의 선택적 배열. google.com 도메인 및 하위 도메인에만 적용됩니다.
userAgent 문자열 작업자 브라우저의 사용자 에이전트. 응답 토큰을 제출할 때 사용합니다.

응답 예제

{
    "errorId":0,
    "status":"ready",
    "solution":
    {
        "gRecaptchaResponse":"3AHJ_VuvYIBNBW5yyv0zRYJ75VkOKvhKj9_xGBJKnQimF72rfoq3Iy-DyGHMwLAo6a3",
        "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"
}