This example clearly shows how you can automate the GeeTest captcha solution. In the example, the captcha is bypassed on the demo page, but the principle of bypassing the captcha is similar everywhere.
git clone https://github.com/dzmitry-duboyski/GeeTest-demo.git
npm install
npm run start
GeeTest security platform is used on many popular sites. In this manual, it is described how to successfully undergo a GeeTest security check using service 2Captcha.com and Puppeteer. For a successful check of the GeeTest captcha, you must have an account in the 2Captcha.com service.
This example describes how to solve captcha GeeTest on the demo page https://2captcha.com/demo/geetest.
-
Find captcha parameters
gt
,challenge
,api_server
:1.1. You can find the value of
gt
in the page code. Screenshot:1.2 Finding the meaning of
challenge
is a bit more difficult. To do this, you need to find the request that the captcha makes on this page, this request must contain the valuechallenge
.The response to the request will be in the following format:
{"success":1,"challenge":"21aaa1c62221631516179b492b9e80cc","gt":"81388ea1fc187e0c335c0a8907ff2625"}
. From this answer, you need to take the valuechallenge
.If we consider the example with a captcha on the page https://2captcha.com/demo/geetest, then in this case it will be a request to https://2captcha.com/api/v1/captcha-demo/gee-test/. The response to this request contains the required
challenge'. Response:
{"success":1,"challenge":"21aaa1c62221631516179b492b9e80cc","gt":"81388ea1fc187e0c335c0a8907ff2625"}`.You can read more about the
challenge
on the page. -
Sending captcha to API.
To solve the captcha, you need to send the found captcha parameters to the API:
"key":"your_api_key",
"method":"geetest"
"pageurl":"https://2captcha.com/demo/geetest"
"gt": "81388ea1fc187e0c335c0a8907ff2625",
"challenge": "21aaa1c62221631516179b492b9e80cc"
- Getting a answer for Captcha.
After successfully solving the captcha, the API will return a response with the solution. Example of a response with a solution from the API:
{
"status": 1,
"request": {
"geetest_challenge": "fd4847c8a368356a0e3a6636392c2854k9",
"geetest_validate": "4606cdf89c8c2e5a43c5a14fe475fc40",
"geetest_seccode": "4606cdf89c8c2e5a43c5a14fe475fc40|jordan"
}
}
- Using the solution. The resulting values must be inserted into the corresponding html elements of the GeeTest captcha on the page.
Example:
<div class="geetest_form">
<input type="hidden" name="geetest_challenge" value="fd4847c8a368356a0e3a6636392c2854k9">
<input type="hidden" name="geetest_validate" value="4606cdf89c8c2e5a43c5a14fe475fc40">
<input type="hidden" name="geetest_seccode" value="4606cdf89c8c2e5a43c5a14fe475fc40">
</div>
Done. After that, you can proceed to perform actions on the page. In this example, after that, the "Check" button is clicked.
The source code is available in the file index.js
geetest-demo's People
geetest-demo's Issues
unable to find the gt parameter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.