• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

How to bypass Google Captcha with python

AnonyViet by AnonyViet
February 23, 2023
in Tips
0

This article is for those of you who are doing reg tools, registering multiple accounts on the website. Or maybe it’s crawling data and getting caught in captcha without knowing how to solve it. When caught in captcha, you have to spend 3 -5 seconds to solve them. For normal users, it’s okay, but for tool users to create from a few hundred to a few thousand accounts or requests, this is not a solution. So in this article, I will show you how to solve Google captcha with Python super easy.

CAPTCHA stands for Completely Automated Public Turing test to tell Computers and Humans Apart. A CAPTCHA is a tool used to distinguish between real users and computers, such as bots. CAPTCHAs present challenges that are difficult for computers to do but relatively easy for humans. For example, identify letters or choose a traffic light in a hard-to-see photo.

CAPTCHA works by providing information to real users to decode. Traditional CAPTCHAs provide distorted or overlapping letters and numbers for user confirmation. Distorted letters make it difficult for bots to decipher and prevent access until the captcha is verified.

Since CAPTCHA was introduced, bots using machine learning have been developed. These bots are better able to verify traditional CAPTCHAs using algorithms that are trained many times over. As a result of this development, newer CAPTCHA methods based on more complex tests are born. For example, reCAPTCHA requires clicking on a specific area and waiting until the solve is successful.

Get AzCaptcha’s KeyAPI

Step 1: First, you go to AZcaptcha website and register a new account. Each newly created account will be given $0.02, you can solve 10 to 20 times depending on the type of Captcha. Note: I recommend that you use a temporary email to create an account. If you run out of money, just create another new account.

Step 2: On the dashboard page, you will see the keyAPI on the right side, copy that keyAPI.

How to bypass Google Captcha with python 4

How to bypass Google Captcha with python

First, you need to make sure your system has full python, pip. Then install 2 more packages request and bs. I will also use the site reCaptcha demo as an example in this article.

You press F12 search for keywords sitekey equal Ctrl + F.

How to bypass Google Captcha with python 5

As you can see above, the div tag has the class “g-recaptcha” and the data-sitekey is “6Le-wvk……”. In python there is a library that helps us to disassemble the html and get the data-sitekey inside the div tag bs4.

from bs4 import BeautifulSoup
import requests
from time import sleep

URL = 'https://www.google.com/recaptcha/api2/demo'

def get_siteKey(url):
    response = requests.get(url)
    soup = BeautifulSoup(response.text, "html.parser")
    g_recaptcha = soup.find_all('div', {'class' : 'g-recaptcha'})
    sitekey = g_recaptcha[0].get('data-sitekey')
    return sitekey

Next is the solve_Captcha function used to solve the captcha. You replace {keyAPI} with the API you get in the AZcaptcha page. After sending the request to solve the captcha successfully, the server will send the id of your captcha. This ID is used to identify the captcha that you send to the server. You should let the program stop for about 30 seconds for the server to solve the captcha.

def solve_Captcha(REQ_URL, url, keyAPI, sitekey):
    payload = {
        'key': keyAPI,
        'method': 'userrecaptcha',
        'googlekey': sitekey,
        'pageurl': url,
        'here': 'now'
    }
    response = requests.post(REQ_URL, data=payload)
    return response

BASE_URL = 'http://azcaptcha.com'
REQ_URL = BASE_URL + '/in.php'
RES_URL = BASE_URL + '/res.php'
keyAPI = '{keyAPI}'

response = solve_Captcha(REQ_URL, URL, keyAPI, siteKey)
if response.status_code == 200:
    print('Solving captcha...')
    id = response.text.split('|')[1]
    sleep(30)

Next, you use the get_gCaptcha function to check if the captcha has been solved. If done, we will get gCaptcha, and if not done, we continue to call the get_gCaptcha function again to check.

def get_gCaptcha(RES_URL, keyAPI, id):
    payload = {
        'key': keyAPI,
        'action': 'get',
        'id': id,
    }
    response = requests.post(RES_URL, data = payload)
    if response.text == 'CAPCHA_NOT_READY':
        print('CAPTCHA NOT READY. Try again in 30s.')
        sleep(30)
        gCaptcha = get_gCaptcha(RES_URL, keyAPI, id)
        return gCaptcha
    if 'OK' in response.text:
        gCaptcha = response.text.split('|')[1]
        return gCaptcha

Full code:

from bs4 import BeautifulSoup
import requests
from time import sleep

URL = 'https://www.google.com/recaptcha/api2/demo'

def get_siteKey(url):
    response = requests.get(url)
    soup = BeautifulSoup(response.text, "html.parser")
    g_recaptcha = soup.find_all('div', {'class' : 'g-recaptcha'})
    sitekey = g_recaptcha[0].get('data-sitekey')
    return sitekey

siteKey = get_siteKey(URL)
print(siteKey)
def solve_Captcha(REQ_URL, url, keyAPI, sitekey):
    payload = {
        'key': keyAPI,
        'method': 'userrecaptcha',
        'googlekey': sitekey,
        'pageurl': url,
        'here': 'now'
    }
    response = requests.post(REQ_URL, data=payload)
    return response
def get_gCaptcha(RES_URL, keyAPI, id):
    payload = {
        'key': keyAPI,
        'action': 'get',
        'id': id,
    }
    response = requests.post(RES_URL, data = payload)
    if response.text == 'CAPCHA_NOT_READY':
        print('CAPTCHA NOT READY. Try again in 30s.')
        sleep(30)
        gCaptcha = get_gCaptcha(RES_URL, keyAPI, id)
        return gCaptcha
    if 'OK' in response.text:
        gCaptcha = response.text.split('|')[1]
        return gCaptcha
    
BASE_URL = 'http://azcaptcha.com'
REQ_URL = BASE_URL + '/in.php'
RES_URL = BASE_URL + '/res.php'
keyAPI = '{keyAPI}'

response = solve_Captcha(REQ_URL, URL, keyAPI, siteKey)
if 'OK' in response.text:
    print('Solving captcha...')
    id = response.text.split('|')[1]
    sleep(30)
    gCaptcha = get_gCaptcha(RES_URL, keyAPI, id)
    print(gCaptcha)
else:
    print(response.text)

You have successfully obtained the gCaptcha code. Next, you just need to replace the gCaptcha code on the page you want to pass the captcha by using the excute javascript command below:

document.getElementById("g-recaptcha-response").innerHTML="{gCaptcha}";

That’s it, then. Good luck.

Tags: BypassCaptchaGooglePython
Previous Post

Instructions to find your Facebook ID

Next Post

Code Create a widget on Facebook – Multi-Function Synthesis

AnonyViet

AnonyViet

Related Posts

Share Tut Set Set Camp to get more comments with Facebook Ads
Tips

Share Tut Set Set Camp to get more comments with Facebook Ads

September 30, 2025
[Update] How to receive Google Ai pro 1 year free with telegram
Tips

[Update] How to receive Google Ai pro 1 year free with telegram

September 29, 2025
How to save photos of friends to overcome Facebook images
Tips

How to save photos of friends to overcome Facebook images

September 29, 2025
Copy all Google Drive others about Google Drive
Tips

Copy all Google Drive others about Google Drive

September 28, 2025
Summarize 8+ orders to create Mid -Autumn Festival for women
Tips

Summarize 8+ orders to create Mid -Autumn Festival for women

September 27, 2025
How to create a portrait of business entrepreneurs
Tips

How to create a portrait of business entrepreneurs

September 27, 2025
Next Post
Code Create a widget on Facebook – Multi-Function Synthesis

Code Create a widget on Facebook - Multi-Function Synthesis

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Recent News

Share Tut Set Set Camp to get more comments with Facebook Ads

Share Tut Set Set Camp to get more comments with Facebook Ads

September 30, 2025
[Update] How to receive Google Ai pro 1 year free with telegram

[Update] How to receive Google Ai pro 1 year free with telegram

September 29, 2025
Top 10 good quality camera memory cards should be used

Top 10 good quality camera memory cards should be used

September 29, 2025
How to block ads on iPhone, iPad and Mac (both web and app)

How to block ads on iPhone, iPad and Mac (both web and app)

September 29, 2025
Share Tut Set Set Camp to get more comments with Facebook Ads

Share Tut Set Set Camp to get more comments with Facebook Ads

September 30, 2025
[Update] How to receive Google Ai pro 1 year free with telegram

[Update] How to receive Google Ai pro 1 year free with telegram

September 29, 2025
Top 10 good quality camera memory cards should be used

Top 10 good quality camera memory cards should be used

September 29, 2025
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

Share Tut Set Set Camp to get more comments with Facebook Ads

Share Tut Set Set Camp to get more comments with Facebook Ads

September 30, 2025
[Update] How to receive Google Ai pro 1 year free with telegram

[Update] How to receive Google Ai pro 1 year free with telegram

September 29, 2025
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí 8XBET https://kubet88.yoga/

No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí 8XBET https://kubet88.yoga/

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply