How To Bypass Google reCaptcha Using Node.Js
The article is originally published to my blog: Solve Google reCaptcha using Node.Js
Ever wondered about bypassing a Google reCaptcha using some captcha solver techniques? If yes, your next question must be how? Well, I have a quick solution that will help you bypass a Google reCaptcha using Node.Js. You can solve Google reCaptcha v2 and v3 both with the help of this tool.
I am using 2Captcha library to solve the reCaptcha. It is a Captcha Solving Software that bypasses the captcha within seconds.
Here is how to bypass captcha
The process of bypassing a captcha is mentioned below-
- Get the Captcha image from page in the form of data-sitekey parameter
- Transfer the parameter to 2captcha service
- The employee at 2captcha solves it
- Once it is solved, we get the response
- The response needs to set in the google reCaptcha textarea to make it work.
That’s it! Isn’t it easy? Yes its pretty easy to bypass. Let’s implement it in code.
Bypass Google Recaptcha using Node.Js
Here is step by step implementation of solving google recaptcha using Node.Js:
Setup Node.Js Application
You can skip this step if you have a existing Node.Js Application.
I am using Express Generator to generate a Node.Js boilerplate.
express bypass-captcha
Install 2captcha
Install the 2captcha package in Node.Js application.
npm install 2captcha
Get 2captcha API Key
The next step is to get a 2captcha API key. Create an Account at 2captcha. Confirm your account by clicking on the link sent to your mail. Go to Setting page to get your API key.
Integrate 2Captcha Code to bypass Google reCaptcha
Once everything is done, integrate the 2Captcha code.
const Captcha = require("2captcha")
// A new 'solver' instance with our API key
const solver = new Captcha.Solver("<Your 2captcha api key>")
/* Example ReCaptcha Website */
/*****
@params
- dataSiteKey
- website url where captcha is placed
*****/
solver.recaptcha("6Ld2sf4SAAAAAKSgzs0Q13IZhY02Pyo31S2jgOB5", "https://patrickhlauke.github.io/recaptcha/")
.then((res) => {
console.log(res)
})
Pass the API key in above code.
That’s it!! You have successfully bypass the Google v2/v3 reCaptcha. You can get more details about 2Captcha APIs here.
Common Questions
How to get Data Site Key
You need to pass a data-sitekey
value to 2Captcha service in order to bypass it. But the question comes- how would I get data-sitekey
value? Here is the solution.
Open the website in browser of which you want to solve the Google reCaptcha. For example, I want to solve reCaptcha at following website: https://patrickhlauke.github.io/recaptcha
Now open “View Page Source” of website. Search for data-sitekey
parameter on page. Copy the value and send in 2Captcha service.
The article is originally published to my blog: Solve Google reCaptcha using Node.Js
Conclusion
In this article in we learnt how to bypass captcha on websites using Node.Js. You can solve many captchas using this tool. More detail here.
Must Read:
Post Photo / Link to Tumblr using Node.Js
Get data from website that does not provide API