Python으로 hCaptcha 우회

대부분의 웹마스터는 자동화에 대한 보호 수단으로 Google ReCaptcha를 사용하고 있습니다. 그러나 이것이 시장에 나와 있는 유일한 솔루션은 아닙니다. 가장 인기 있는 대안 중 하나는 hCaptcha입니다. 이제 Anti-DDoS 시장의 리더이자 현재 주요 CDN 제공업체 중 하나인 Cloudflare에서 사용하고 있습니다. Cloudflare가 의심스러운 것을 발견하면 조만간 hCaptcha를 만나게 될 것입니다.

Cloudflare happily announced that they are moving from Google ReCaptcha to Intuition Machines's hCaptcha. The move helped big time with data confidentiality concerns and captcha flexibility. Now attack protection is even more adaptive. This will affect all Cloudflare customers.



또한, hCaptcha
  • Google과 달리 개인 데이터를 수집하지 않습니다.
  • 전 세계적으로 배포된 CDN으로 인해 보안 문자는 빠르고 완벽하게 작동합니다.
  • ReCaptcha와 호환되므로 마이그레이션이 매우 쉽습니다.
  • 장애인에게 적합합니다.

  • 훌륭하지 않나요? 그러나 Cloudflare에서 hCaptcha를 우회하는 것은 어떻습니까?

    빠른 hCaptcha 자동화를 위해 2captcha-python 모듈을 사용합니다. Python 3.x가 필요하며 pip로 설치할 수 있습니다.

    pip3 install 2captcha-python
    

    또는 저장소를 복제할 수 있지만 미리 요청 모듈을 설치하는 것을 잊지 마십시오.

    git clone https://github.com/2captcha/2captcha-python.git
    

    준비

    API 키를 보내는 2Captcha 클래스의 새 인스턴스를 만들어야 합니다.

    from 2captcha import 2Captcha #module import
solver = 2Captcha('YOUR_API_KEY') #your 2captcha API key
    

    보안 문자 해상도

    이제 보안 문자 해결 알고리즘을 만들어 보겠습니다.

    result = solver.hcaptcha(sitekey='10000000-ffff-ffff-ffff-000000000001',                            url='https://www.site.com/page/',                             proxy={
                                    'type': 'HTTPS',
                                    'uri': 'username:[email protected]:1234'
                                })
    

    Cloudflare는 hCaptcha 토큰 확인 중에 IP 주소를 확인합니다. 이제 보안 문자는 제출한 동일한 IP 주소에서 해결되어야 합니다. Cloudflare에서 hCaptcha를 성공적으로 우회하려면 다른 보안 문자 매개변수와 함께 프록시를 보내야 합니다.

    이 호출은 보안 문자를 우회하는 토큰을 반환합니다.

    {'captchaId': '64793693810', 'code': 'P0_eyJ0eXAiOiJKV1QiLCJhbGciOiJIUz...'} 
    

    솔루션 사용

    그런 다음 코드의 토큰이 h-captcha-response 및 g-recaptcha-response 필드의 웹사이트에 제출됩니다. 가장 쉬운 방법은 브라우저를 사용하는 경우 JavaScript를 사용하는 것입니다. 그렇지 않으면 적절한 HTTP 요청에서 토큰을 보냅니다.

    let submitToken = (token) => {
       document.querySelector('[name=g-recaptcha-response]').innerText = token
       document.querySelector('[name=h-captcha-response]').innerText = token
       document.querySelector('.challenge-form').submit()
    }
    submitToken('TOKEN_STRING')
    

    시간을 할애할 가치가 있습니까? 우리의 의견으로는 절대적으로 그렇습니다. 몇 줄의 코드로 많은 시간을 절약할 수 있습니다. 그리고 자체 호스팅 솔루션을 실행하기로 결정했다면 2captcha가 훨씬 더 많은 수익을 올릴 것입니다.

    좋은 웹페이지 즐겨찾기