@2captcha/captcha-solver 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -9
- package/package.json +64 -64
- package/README.ru.md +0 -385
- package/README.zh.md +0 -361
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -8
- package/dist/structs/2captcha.d.ts +0 -821
- package/dist/structs/2captcha.d.ts.map +0 -1
- package/dist/structs/2captcha.js +0 -1148
- package/dist/structs/2captchaError.d.ts +0 -6
- package/dist/structs/2captchaError.d.ts.map +0 -1
- package/dist/structs/2captchaError.js +0 -275
- package/dist/structs/2captchaServer.d.ts +0 -36
- package/dist/structs/2captchaServer.d.ts.map +0 -1
- package/dist/structs/2captchaServer.js +0 -91
- package/dist/structs/constants/constants.d.ts +0 -15
- package/dist/structs/constants/constants.d.ts.map +0 -1
- package/dist/structs/constants/constants.js +0 -25
- package/dist/structs/providers/providers.d.ts +0 -6
- package/dist/structs/providers/providers.d.ts.map +0 -1
- package/dist/structs/providers/providers.js +0 -20
- package/dist/utils/checkCaptchaParams.d.ts +0 -8
- package/dist/utils/checkCaptchaParams.d.ts.map +0 -1
- package/dist/utils/checkCaptchaParams.js +0 -119
- package/dist/utils/fetch.d.ts +0 -4
- package/dist/utils/fetch.d.ts.map +0 -1
- package/dist/utils/fetch.js +0 -6
- package/dist/utils/generic.d.ts +0 -21
- package/dist/utils/generic.d.ts.map +0 -1
- package/dist/utils/generic.js +0 -47
package/README.md
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
# JavaScript Module for 2Captcha API
|
|
1
|
+
# JavaScript captcha solver module for 2Captcha API
|
|
5
2
|
|
|
6
3
|
## Description
|
|
7
|
-
A wrapper around the [2captcha](https://2captcha.com/) API. This wrapper
|
|
4
|
+
A wrapper around the [2captcha](https://2captcha.com/) API. This wrapper supports any captcha bypass: reCAPTCHA V2, reCAPTCHA V3, hCaptcha, Arkose Labs FunCaptcha, image captcha, Coordinates (Click Captcha), Geetest, Geetest V4, Yandex Smart Captcha, Lemin captcha, Amazon WAF, Cloudflare Turnstile, Capy Puzzle, DataDome CAPTCHA, CyberSiARA, MTCaptcha, Friendly Captcha.
|
|
8
5
|
|
|
9
6
|
Also added support for the `bounding_box` method. The Bounding Box Method allows you to mark data on the image. This method can be used to mark up datasets or highlight any objects in an image according to the given instructions. Read more about using *Bounding Box Method* on [documentation](https://2captcha.com/2captcha-api#bounding_box).
|
|
10
7
|
|
|
11
|
-
[2captcha](https://2captcha.com/) is a service that solves many different types of captchas, this library serves as a wrapper around API 2captcha to bring easy, promise-based functionality to
|
|
8
|
+
[2captcha](https://2captcha.com/) is a service that solves many different types of captchas, this library serves as a wrapper around API 2captcha to bring easy, promise-based functionality to Node.js. This library specializes in concurrent solves, and Bulk API usage.
|
|
12
9
|
|
|
13
10
|
- [Install](#install)
|
|
14
11
|
- [Configuration](#configuration)
|
|
@@ -36,6 +33,7 @@ Also added support for the `bounding_box` method. The Bounding Box Method allows
|
|
|
36
33
|
- [badReport](#badreport)
|
|
37
34
|
- [goodReport](#goodreport)
|
|
38
35
|
- [balance](#balance)
|
|
36
|
+
- [Proxies](#proxies)
|
|
39
37
|
- [Useful articles](#useful-articles)
|
|
40
38
|
- [How to bypass Geetest v4 CAPTCHA](https://2captcha.com/blog/geetest-v4-support)
|
|
41
39
|
- [Automatic reCAPTCHA V3 resolution - a tutorial for developers and customers](https://2captcha.com/blog/recaptcha-v3-automatic-resolution)
|
|
@@ -197,7 +195,7 @@ solver.geetestV4({
|
|
|
197
195
|
|
|
198
196
|
### Yandex Smart Captcha
|
|
199
197
|
|
|
200
|
-
Use this method to solve Yandex and obtain a token to bypass the protection.
|
|
198
|
+
Use this method to solve Yandex Smart Captcha and obtain a token to bypass the protection.
|
|
201
199
|
|
|
202
200
|
```js
|
|
203
201
|
solver.yandexSmart({
|
|
@@ -214,7 +212,7 @@ solver.yandexSmart({
|
|
|
214
212
|
|
|
215
213
|
### Lemin captcha
|
|
216
214
|
|
|
217
|
-
Use this method to solve Lemin and obtain a token to bypass the protection.
|
|
215
|
+
Use this method to solve Lemin captcha and obtain a token to bypass the protection.
|
|
218
216
|
|
|
219
217
|
```js
|
|
220
218
|
solver.lemin({
|
|
@@ -445,7 +443,28 @@ solver.balance()
|
|
|
445
443
|
})
|
|
446
444
|
```
|
|
447
445
|
|
|
446
|
+
## Proxies
|
|
447
|
+
|
|
448
|
+
You can pass your proxy as an additional argument for methods: recaptcha, funcaptcha, geetest, geetest v4, hcaptcha, keycaptcha, capy puzzle, lemin, turnstile, amazon waf, DataDome, CyberSiARA, MTCaptcha, Friendly Captcha and etc. The proxy will be forwarded to the API to solve the captcha.
|
|
449
|
+
|
|
450
|
+
We have our own proxies that we can offer you. [Buy residential proxies] for avoid restrictions and blocks. [Quick start].
|
|
451
|
+
|
|
452
|
+
Solving reCAPTCHA V2 using proxy:
|
|
453
|
+
```js
|
|
454
|
+
solver.recaptcha({
|
|
455
|
+
pageurl: 'https://2captcha.com/demo/recaptcha-v2',
|
|
456
|
+
googlekey: '6LfD3PIbAAAAAJs_eEHvoOl75_83eXSqpPSRFJ_u',
|
|
457
|
+
proxy: 'HTTPS',
|
|
458
|
+
proxytype: 'login:password@123.123.123.123:3128'
|
|
459
|
+
})
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
|
|
448
463
|
## Useful articles
|
|
449
464
|
* [How to bypass Geetest v4 CAPTCHA](https://2captcha.com/blog/geetest-v4-support)
|
|
450
465
|
* [Automatic reCAPTCHA V3 resolution - a tutorial for developers and customers](https://2captcha.com/blog/recaptcha-v3-automatic-resolution)
|
|
451
|
-
* Finding Sitekey <a href="./docs/hcaptcha.md">hCaptcha</a>
|
|
466
|
+
* Finding Sitekey <a href="./docs/hcaptcha.md">hCaptcha</a>
|
|
467
|
+
|
|
468
|
+
<!-- Shared links -->
|
|
469
|
+
[Buy residential proxies]: https://2captcha.com/proxy/residential-proxies
|
|
470
|
+
[Quick start]: https://2captcha.com/proxy?openAddTrafficModal=true
|
package/package.json
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@2captcha/captcha-solver",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "JavaScript library for easy integration with the API of 2captcha captcha solving service to bypass reCAPTCHA, hCaptcha, funcaptcha, geetest and solve any other captchas.",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/2captcha/2captcha-javascript.git"
|
|
9
|
-
},
|
|
10
|
-
"license": "MIT",
|
|
11
|
-
"author": "2Captcha",
|
|
12
|
-
"bugs": {
|
|
13
|
-
"url": "https://github.com/2captcha/2captcha-javascript/issues"
|
|
14
|
-
},
|
|
15
|
-
"homepage": "https://github.com/2captcha/2captcha-javascript",
|
|
16
|
-
"types": "dist/index.d.ts",
|
|
17
|
-
"keywords": [
|
|
18
|
-
"2captcha",
|
|
19
|
-
"captcha",
|
|
20
|
-
"api",
|
|
21
|
-
"captchasolver",
|
|
22
|
-
"capmonster",
|
|
23
|
-
"reCAPTCHA",
|
|
24
|
-
"hCaptcha",
|
|
25
|
-
"FunCaptcha",
|
|
26
|
-
"Geetest",
|
|
27
|
-
"image captcha",
|
|
28
|
-
"
|
|
29
|
-
"Click Captcha",
|
|
30
|
-
"Geetest V4",
|
|
31
|
-
"Yandex Smart Captcha",
|
|
32
|
-
"Lemin captcha",
|
|
33
|
-
"bypass captcha",
|
|
34
|
-
"solve captcha",
|
|
35
|
-
"Amazon WAF",
|
|
36
|
-
"Cloudflare Turnstile",
|
|
37
|
-
"Capy Puzzle",
|
|
38
|
-
"行为验证4.0",
|
|
39
|
-
"行为验证",
|
|
40
|
-
"DataDome CAPTCHA",
|
|
41
|
-
"CyberSiARA",
|
|
42
|
-
"MTCaptcha",
|
|
43
|
-
"Bounding Box Method",
|
|
44
|
-
"Friendly Captcha"
|
|
45
|
-
],
|
|
46
|
-
"scripts": {
|
|
47
|
-
"go": "tsc && node ./dist/index.js",
|
|
48
|
-
"dev": "tsc && node ./issues/dev",
|
|
49
|
-
"jsdoc": "jsdoc",
|
|
50
|
-
"docgen": "tsc && yarn jsdoc ./dist -R \"./readme.md\" -P \"./package.json\" -t \"./node_modules/jaguarjs-jsdoc\" -d \"./docs\" -r",
|
|
51
|
-
"test": "tsc && node ./tests/mtCaptcha.js"
|
|
52
|
-
},
|
|
53
|
-
"dependencies": {
|
|
54
|
-
"node-fetch": "^2.6.1"
|
|
55
|
-
},
|
|
56
|
-
"devDependencies": {
|
|
57
|
-
"@types/node": "^20.8.7",
|
|
58
|
-
"@types/node-fetch": "^2.5.7",
|
|
59
|
-
"dotenv": "^16.0.3",
|
|
60
|
-
"jaguarjs-jsdoc": "^1.0.2",
|
|
61
|
-
"jsdoc": "^4.0.2",
|
|
62
|
-
"typescript": "^4.9.4"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@2captcha/captcha-solver",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "JavaScript library for easy integration with the API of 2captcha captcha solving service to bypass reCAPTCHA, hCaptcha, funcaptcha, geetest and solve any other captchas.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/2captcha/2captcha-javascript.git"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"author": "2Captcha",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/2captcha/2captcha-javascript/issues"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/2captcha/2captcha-javascript",
|
|
16
|
+
"types": "dist/index.d.ts",
|
|
17
|
+
"keywords": [
|
|
18
|
+
"2captcha",
|
|
19
|
+
"captcha",
|
|
20
|
+
"api",
|
|
21
|
+
"captchasolver",
|
|
22
|
+
"capmonster",
|
|
23
|
+
"reCAPTCHA",
|
|
24
|
+
"hCaptcha",
|
|
25
|
+
"FunCaptcha",
|
|
26
|
+
"Geetest",
|
|
27
|
+
"image captcha",
|
|
28
|
+
"Coordinates",
|
|
29
|
+
"Click Captcha",
|
|
30
|
+
"Geetest V4",
|
|
31
|
+
"Yandex Smart Captcha",
|
|
32
|
+
"Lemin captcha",
|
|
33
|
+
"bypass captcha",
|
|
34
|
+
"solve captcha",
|
|
35
|
+
"Amazon WAF",
|
|
36
|
+
"Cloudflare Turnstile",
|
|
37
|
+
"Capy Puzzle",
|
|
38
|
+
"行为验证4.0",
|
|
39
|
+
"行为验证",
|
|
40
|
+
"DataDome CAPTCHA",
|
|
41
|
+
"CyberSiARA",
|
|
42
|
+
"MTCaptcha",
|
|
43
|
+
"Bounding Box Method",
|
|
44
|
+
"Friendly Captcha"
|
|
45
|
+
],
|
|
46
|
+
"scripts": {
|
|
47
|
+
"go": "tsc && node ./dist/index.js",
|
|
48
|
+
"dev": "tsc && node ./issues/dev",
|
|
49
|
+
"jsdoc": "jsdoc",
|
|
50
|
+
"docgen": "tsc && yarn jsdoc ./dist -R \"./readme.md\" -P \"./package.json\" -t \"./node_modules/jaguarjs-jsdoc\" -d \"./docs\" -r",
|
|
51
|
+
"test": "tsc && node ./tests/mtCaptcha.js"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"node-fetch": "^2.6.1"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@types/node": "^20.8.7",
|
|
58
|
+
"@types/node-fetch": "^2.5.7",
|
|
59
|
+
"dotenv": "^16.0.3",
|
|
60
|
+
"jaguarjs-jsdoc": "^1.0.2",
|
|
61
|
+
"jsdoc": "^4.0.2",
|
|
62
|
+
"typescript": "^4.9.4"
|
|
63
|
+
}
|
|
64
|
+
}
|
package/README.ru.md
DELETED
|
@@ -1,385 +0,0 @@
|
|
|
1
|
-
[English](README.md) | [中国语文科](README.zh.md) | <b>[Русский](README.ru.md)</b>
|
|
2
|
-
|
|
3
|
-
# JavaScript модуль для 2Captcha API
|
|
4
|
-
|
|
5
|
-
## Описание
|
|
6
|
-
Оболочка вокруг API сервиса [2captcha](https://2captcha.com/). Эта оболочка поддерживает решение следующих типов капч: reCAPTCHA V2, reCAPTCHA V3, hCaptcha, Arkose Labs FunCaptcha, image captcha, Coordinates (Click Captcha), Geetest, Geetest V4, Yandex Smart Captcha, Lemin captcha, Amazon WAF, Cloudflare Turnstile, Capy Puzzle, DataDome CAPTCHA, CyberSiARA, MTCaptcha, Friendly Captcha.
|
|
7
|
-
|
|
8
|
-
Также добавлена поддержка метода `bounding_box`. Метод ограничивающей рамки позволяет размечать данные на изображении. Этот метод можно использовать для разметки наборов данных или выделения любых объектов на изображении в соответствии с заданными инструкциями. Подробнее об использовании *Bounding Box Method* читайте в [документации](https://2captcha.com/2captcha-api#bounding_box).
|
|
9
|
-
|
|
10
|
-
[2captcha](https://2captcha.com/) это сервис, который решает множество различных типов капч. Эта библиотека служит оболочкой для API 2captcha, чтобы предоставить NodeJS простую функциональность, основанную на `promise`.
|
|
11
|
-
|
|
12
|
-
## Поддерживаемые типы капч:
|
|
13
|
-
- ✅ google-recaptcha (reCAPTCHA v2 / reCAPTCHA v3)
|
|
14
|
-
- ✅ hCaptcha
|
|
15
|
-
- ✅ Arkose Labs FunCaptcha
|
|
16
|
-
- ✅ Image captchas. (`base64` format)
|
|
17
|
-
- ✅ Geetest
|
|
18
|
-
- ✅ Geetest v4
|
|
19
|
-
- ✅ Yandex Smart Captcha
|
|
20
|
-
- ✅ Lemin Cropped Captcha
|
|
21
|
-
- ✅ Cloudflare Turnstile
|
|
22
|
-
- ✅ Amazon WAF Captcha
|
|
23
|
-
- ✅ Capy Puzzle
|
|
24
|
-
- ✅ Coordinates (Click Captcha)
|
|
25
|
-
- ⬜ Audio Recogntion
|
|
26
|
-
- ✅ DataDome CAPTCHA
|
|
27
|
-
- ✅ CyberSiARA
|
|
28
|
-
- ✅ MTCaptcha
|
|
29
|
-
- ✅ Friendly Captcha
|
|
30
|
-
- ✅ Bounding Box Method
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
## Установка
|
|
34
|
-
|
|
35
|
-
```sh
|
|
36
|
-
npm install @2captcha/captcha-solver
|
|
37
|
-
```
|
|
38
|
-
```sh
|
|
39
|
-
yarn add @2captcha/captcha-solver
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## Примеры использования
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
### reCAPTCHA:
|
|
46
|
-
```js
|
|
47
|
-
const Captcha = require("@2captcha/captcha-solver")
|
|
48
|
-
// Новый экземпляр "solver" со значением вашего ключа 2captcha API
|
|
49
|
-
const solver = new Captcha.Solver("<Your 2captcha api key>")
|
|
50
|
-
|
|
51
|
-
// Решение reCAPTCHA, на демо странице содержащей reCAPTCHA V2
|
|
52
|
-
solver.recaptcha({
|
|
53
|
-
pageurl: 'https://2captcha.com/demo/recaptcha-v2',
|
|
54
|
-
googlekey: '6LfD3PIbAAAAAJs_eEHvoOl75_83eXSqpPSRFJ_u'
|
|
55
|
-
})
|
|
56
|
-
.then((res) => {
|
|
57
|
-
console.log(res);
|
|
58
|
-
})
|
|
59
|
-
.catch((err) => {
|
|
60
|
-
console.log(err);
|
|
61
|
-
})
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### hCaptcha:
|
|
65
|
-
```js
|
|
66
|
-
const Captcha = require("@2captcha/captcha-solver")
|
|
67
|
-
const solver = new Captcha.Solver("<Your 2captcha api key>")
|
|
68
|
-
|
|
69
|
-
solver.hcaptcha({
|
|
70
|
-
pageurl: "https://2captcha.com/demo/hcaptcha?difficulty=moderate",
|
|
71
|
-
sitekey: "b76cd927-d266-4cfb-a328-3b03ae07ded6"
|
|
72
|
-
})
|
|
73
|
-
.then((res) => {
|
|
74
|
-
console.log(res);
|
|
75
|
-
})
|
|
76
|
-
.catch((err) => {
|
|
77
|
-
console.log(err);
|
|
78
|
-
})
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### Arkose Labs FunCaptcha:
|
|
82
|
-
```js
|
|
83
|
-
const Captcha = require("@2captcha/captcha-solver")
|
|
84
|
-
const solver = new Captcha.Solver("<Your 2captcha api key>")
|
|
85
|
-
|
|
86
|
-
solver.funCaptcha({
|
|
87
|
-
pageurl: "https://funcaptcha.com/tile-game-lite-mode/fc/api/nojs/?pkey=804380F4-6844-FFA1-ED4E-5877CA1F1EA4&lang=en",
|
|
88
|
-
publickey: "804380F4-6844-FFA1-ED4E-5877CA1F1EA4"
|
|
89
|
-
})
|
|
90
|
-
.then((res) => {
|
|
91
|
-
console.log(res);
|
|
92
|
-
})
|
|
93
|
-
.catch((err) => {
|
|
94
|
-
console.log(err);
|
|
95
|
-
})
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### Image captcha:
|
|
99
|
-
```js
|
|
100
|
-
const Captcha = require("@2captcha/captcha-solver")
|
|
101
|
-
const fs = require("fs")
|
|
102
|
-
const solver = new Captcha.Solver("<Your 2captcha api key>")
|
|
103
|
-
|
|
104
|
-
// Получаем содержимое файла в формате base64
|
|
105
|
-
const imageBase64 = fs.readFileSync("./tests/media/imageCaptcha_6e584.png", "base64")
|
|
106
|
-
|
|
107
|
-
solver.imageCaptcha({
|
|
108
|
-
body: imageBase64,
|
|
109
|
-
numeric: 4,
|
|
110
|
-
min_len: 5,
|
|
111
|
-
max_len: 5
|
|
112
|
-
})
|
|
113
|
-
.then((res) => {
|
|
114
|
-
console.log(res);
|
|
115
|
-
})
|
|
116
|
-
.catch((err) => {
|
|
117
|
-
console.log(err);
|
|
118
|
-
})
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
### GeeTest Captcha:
|
|
123
|
-
```js
|
|
124
|
-
const Captcha = require("@2captcha/captcha-solver")
|
|
125
|
-
const solver = new Captcha.Solver("<Your 2captcha api key>")
|
|
126
|
-
|
|
127
|
-
// Значение `challenge` является динамическим
|
|
128
|
-
// Читайте подробнее о `challenge` на странице https://2captcha.com/p/geetest
|
|
129
|
-
solver.geetest({
|
|
130
|
-
pageurl: 'https://2captcha.com/demo/geetest',
|
|
131
|
-
gt: '81388ea1fc187e0c335c0a8907ff2625',
|
|
132
|
-
challenge: '<you need to get a new challenge value each time>'
|
|
133
|
-
})
|
|
134
|
-
.then((res) => {
|
|
135
|
-
console.log(res);
|
|
136
|
-
})
|
|
137
|
-
.catch((err) => {
|
|
138
|
-
console.log(err);
|
|
139
|
-
})
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
### GeeTest V4 Captcha:
|
|
143
|
-
```js
|
|
144
|
-
const Captcha = require("@2captcha/captcha-solver")
|
|
145
|
-
const solver = new Captcha.Solver("<Your 2captcha api key>")
|
|
146
|
-
|
|
147
|
-
solver.geetestV4({
|
|
148
|
-
pageurl: 'https://2captcha.com/demo/geetest-v4',
|
|
149
|
-
captcha_id: 'e392e1d7fd421dc63325744d5a2b9c73'
|
|
150
|
-
})
|
|
151
|
-
.then((res) => {
|
|
152
|
-
console.log(res);
|
|
153
|
-
})
|
|
154
|
-
.catch((err) => {
|
|
155
|
-
console.log(err);
|
|
156
|
-
})
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
### Yandex Smart Captcha:
|
|
160
|
-
```js
|
|
161
|
-
const Captcha = require("@2captcha/captcha-solver")
|
|
162
|
-
const solver = new Captcha.Solver("<Your 2captcha api key>")
|
|
163
|
-
|
|
164
|
-
solver.yandexSmart({
|
|
165
|
-
pageurl: "https://captcha-api.yandex.ru/demo",
|
|
166
|
-
sitekey: "FEXfAbHQsToo97VidNVk3j4dC74nGW1DgdxjtNB9"
|
|
167
|
-
})
|
|
168
|
-
.then((res) => {
|
|
169
|
-
console.log(res);
|
|
170
|
-
})
|
|
171
|
-
.catch((err) => {
|
|
172
|
-
console.log(err);
|
|
173
|
-
})
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
### Lemin captcha:
|
|
177
|
-
```js
|
|
178
|
-
const Captcha = require("@2captcha/captcha-solver")
|
|
179
|
-
const solver = new Captcha.Solver("<Your 2captcha api key>")
|
|
180
|
-
|
|
181
|
-
solver.lemin({
|
|
182
|
-
pageurl:'https://dashboard.leminnow.com/auth/login',
|
|
183
|
-
captcha_id: 'CROPPED_099216d_34698cb7b8574265925f493cbcb3df4d',
|
|
184
|
-
div_id: 'lemin-cropped-captcha',
|
|
185
|
-
api_server: 'https://api.leminnow.com/captcha/v1/cropped'
|
|
186
|
-
})
|
|
187
|
-
.then((res) => {
|
|
188
|
-
console.log(res);
|
|
189
|
-
})
|
|
190
|
-
.catch((err) => {
|
|
191
|
-
console.log(err);
|
|
192
|
-
})
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
### Cloudflare Turnstile:
|
|
196
|
-
```js
|
|
197
|
-
const Captcha = require("@2captcha/captcha-solver")
|
|
198
|
-
const solver = new Captcha.Solver("<Your 2captcha api key>")
|
|
199
|
-
|
|
200
|
-
solver.cloudflareTurnstile({
|
|
201
|
-
pageurl: "https://app.nodecraft.com/login",
|
|
202
|
-
sitekey: "0x4AAAAAAAAkg0s3VIOD10y4"
|
|
203
|
-
})
|
|
204
|
-
.then((res) => {
|
|
205
|
-
console.log(res);
|
|
206
|
-
})
|
|
207
|
-
.catch((err) => {
|
|
208
|
-
console.log(err);
|
|
209
|
-
})
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
### Amazon WAF Captcha (AWS WAF):
|
|
213
|
-
```js
|
|
214
|
-
const Captcha = require("@2captcha/captcha-solver")
|
|
215
|
-
const solver = new Captcha.Solver("<Your 2captcha api key>")
|
|
216
|
-
|
|
217
|
-
// INFO: Значение `context` является динамическим, необходимо каждый раз брать фактическое значение со страницы с капчей.
|
|
218
|
-
solver.amazonWaf({
|
|
219
|
-
pageurl: "https://non-existent-example.execute-api.us-east-1.amazonaws.com/latest",
|
|
220
|
-
sitekey: "AQIDAHjcYu/GjX+QlghicBgQ/7bFaQZ+m5FKCMDnO+vTbNg96AHMDLodoefdvyOnsHMRt...",
|
|
221
|
-
context: "9BUgmlm48F92WUoqv97a49ZuEJJ50TCk9MVr3C7WMtQ0X6flVbufM4n8mjFLmbLVAPgaQ...",
|
|
222
|
-
iv: "CgAHbCe2GgAAAAAj",
|
|
223
|
-
})
|
|
224
|
-
.then((res) => {
|
|
225
|
-
console.log(res);
|
|
226
|
-
})
|
|
227
|
-
.catch((err) => {
|
|
228
|
-
console.log(err);
|
|
229
|
-
})
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
### Capy Puzzle
|
|
233
|
-
```js
|
|
234
|
-
const Captcha = require("@2captcha/captcha-solver")
|
|
235
|
-
const solver = new Captcha.Solver("<Your 2captcha api key>")
|
|
236
|
-
|
|
237
|
-
solver.capyPuzzle({
|
|
238
|
-
pageurl: "https://www.capy.me/account/register/",
|
|
239
|
-
captchakey: "PUZZLE_Cme4hZLjuZRMYC3uh14C52D3uNms5w"
|
|
240
|
-
})
|
|
241
|
-
.then((res) => {
|
|
242
|
-
console.log(res);
|
|
243
|
-
})
|
|
244
|
-
.catch((err) => {
|
|
245
|
-
console.log(err);
|
|
246
|
-
})
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
### DataDome CAPTCHA
|
|
250
|
-
```js
|
|
251
|
-
const Captcha = require("@2captcha/captcha-solver")
|
|
252
|
-
const solver = new Captcha.Solver("<Your 2captcha api key>")
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
solver.dataDome({
|
|
256
|
-
pageurl: "https://rendezvousparis.hermes.com/client/register",
|
|
257
|
-
captcha_url: "https://geo.captcha-delivery.com/captcha/?initialCid=AHrlqAAAAAMAEuQtkf4k1c0ABZhYZA%3D%3D&hash=789361B674144528D0B7EE76B35826&cid=mY4z7GNmh7Nt1lAFwpbNHAOcWPhyPgjHD2K1Pm~Od1iEKYLUnK3t7N2ZGUj8OqDK65cnwJHtHwd~t902vlwpSBA5l4ZHbS1Qszv~jEuEUJNQ_jMAjar2Kj3kq20MRJYh&t=fe&referer=https%3A%2F%2Frendezvousparis.hermes.com%2Fclient%2Fregister&s=40119&e=67fef144ac1a54dbd7507776367d2f9d5e36ec3add17fa22f3cb881db8385838",
|
|
258
|
-
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36",
|
|
259
|
-
proxy: "login:password@1.2.3.4:8888", // The (Username : Password @ Address : Port) of our chosen proxy
|
|
260
|
-
proxytype: "http" // The 'Type' of proxy, http, https, socks, ect.
|
|
261
|
-
})
|
|
262
|
-
.then((res) => {
|
|
263
|
-
console.log(res);
|
|
264
|
-
})
|
|
265
|
-
.catch((err) => {
|
|
266
|
-
console.log(err);
|
|
267
|
-
})
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
### CyberSiARA
|
|
271
|
-
```js
|
|
272
|
-
const Captcha = require("@2captcha/captcha-solver")
|
|
273
|
-
const solver = new Captcha.Solver("<Your 2captcha api key>")
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
solver.cyberSiARA({
|
|
277
|
-
pageurl: "https://www.cybersiara.com/book-a-demo",
|
|
278
|
-
master_url_id: "OXR2LVNvCuXykkZbB8KZIfh162sNT8S2",
|
|
279
|
-
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
|
|
280
|
-
})
|
|
281
|
-
.then((res) => {
|
|
282
|
-
console.log(res);
|
|
283
|
-
})
|
|
284
|
-
.catch((err) => {
|
|
285
|
-
console.log(err);
|
|
286
|
-
})
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
### MTCaptcha
|
|
290
|
-
```js
|
|
291
|
-
const Captcha = require("@2captcha/captcha-solver")
|
|
292
|
-
const solver = new Captcha.Solver("<Your 2captcha api key>")
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
solver.mtCaptcha({
|
|
296
|
-
pageurl: "https://service.mtcaptcha.com/mtcv1/demo/index.html",
|
|
297
|
-
sitekey: "MTPublic-DemoKey9M"
|
|
298
|
-
})
|
|
299
|
-
.then((res) => {
|
|
300
|
-
console.log(res);
|
|
301
|
-
})
|
|
302
|
-
.catch((err) => {
|
|
303
|
-
console.log(err);
|
|
304
|
-
})
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
### Friendly Captcha
|
|
308
|
-
|
|
309
|
-
Используйте этот метод, чтобы решить Friendly Captcha и получить токен для обхода защиты.
|
|
310
|
-
|
|
311
|
-
> **Важно:**Для успешного использования полученного токена, на странице не должен быть загружен виджет капчи. Для этого вам нужно прервать запрос к `/friendcaptcha/...module.min.js` на странице. Когда виджет капчи уже загружен на страницу, велика вероятность, что полученный токен не сработает.
|
|
312
|
-
|
|
313
|
-
```js
|
|
314
|
-
solver.friendlyCaptcha({
|
|
315
|
-
pageurl: "https://geizhals.de/?liftban=1&from=/455973138?fsean=5901747021356",
|
|
316
|
-
sitekey: "FCMST5VUMCBOCGQ9"
|
|
317
|
-
})
|
|
318
|
-
.then((res) => {
|
|
319
|
-
console.log(res);
|
|
320
|
-
})
|
|
321
|
-
.catch((err) => {
|
|
322
|
-
console.log(err);
|
|
323
|
-
})
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
### Coordinates (Click Captcha):
|
|
327
|
-
```js
|
|
328
|
-
const Captcha = require("@2captcha/captcha-solver")
|
|
329
|
-
const solver = new Captcha.Solver("<Your 2captcha api key>")
|
|
330
|
-
const imageBase64 = fs.readFileSync("./tests/media/hCaptchaImage.jpg", "base64")
|
|
331
|
-
|
|
332
|
-
solver.coordinates({
|
|
333
|
-
body: imageBase64,
|
|
334
|
-
textinstructions: 'Select all photos containing the boat'
|
|
335
|
-
})
|
|
336
|
-
.then((res) => {
|
|
337
|
-
console.log(res);
|
|
338
|
-
})
|
|
339
|
-
.catch((err) => {
|
|
340
|
-
console.log(err);
|
|
341
|
-
})
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
### Bounding Box Method:
|
|
345
|
-
*Bounding Box Method* позволяет выбирать объекты, указанные на изображении. Для этого вам необходимо передать инструкции по разметке. Инструкции могут быть отправлены в виде текста или изображения, закодированного в формате `base64`. Обязательно необходимо передать хотя бы одну инструкцию `imginstructions` или `textinstructions`.
|
|
346
|
-
|
|
347
|
-
```js
|
|
348
|
-
const Captcha = require("@2captcha/captcha-solver")
|
|
349
|
-
const solver = new Captcha.Solver("<Your 2captcha api key>")
|
|
350
|
-
|
|
351
|
-
solver.boundingBox({
|
|
352
|
-
image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAR4AAACwCAIAAAB...",
|
|
353
|
-
textinstructions: "Обведите все машины на изображении.",
|
|
354
|
-
})
|
|
355
|
-
.then((res) => {
|
|
356
|
-
console.log(res);
|
|
357
|
-
})
|
|
358
|
-
.catch((err) => {
|
|
359
|
-
console.log(err);
|
|
360
|
-
})
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
### Proxy:
|
|
364
|
-
```js
|
|
365
|
-
const Captcha = require("@2captcha/captcha-solver")
|
|
366
|
-
const solver = new Captcha.Solver("<Your 2captcha api key>")
|
|
367
|
-
|
|
368
|
-
solver.recaptcha({
|
|
369
|
-
pageurl: 'https://2captcha.com/demo/recaptcha-v2',
|
|
370
|
-
googlekey: '6LfD3PIbAAAAAJs_eEHvoOl75_83eXSqpPSRFJ_u',
|
|
371
|
-
proxy: "login:password@1.2.3.4:8888", // Параметры используемого вами прокси сервера
|
|
372
|
-
proxytype: "HTTP" // Тип используемого прокси: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
|
|
373
|
-
})
|
|
374
|
-
.then((res) => {
|
|
375
|
-
console.log(res)
|
|
376
|
-
})
|
|
377
|
-
.catch((err) => {
|
|
378
|
-
console.error(err.message)
|
|
379
|
-
})
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
## Полезные статьи
|
|
383
|
-
* [Как решать капчу Geetest v4](https://2captcha.com/ru/blog/geetest-v4-obkhod)
|
|
384
|
-
* [Автоматическое решение reCAPTCHA V3 - инструкция для разработчиков и заказчиков](https://2captcha.com/ru/blog/avtomaticheskoe-reshenie-recaptcha-v3)
|
|
385
|
-
* <a href="./docs/hcaptcha.md">Поиск значения `sitekey` для hCaptcha</a>
|