@intuned/runtime-dev 1.3.27-dev7 → 1.3.29-stealth.0
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/.claude/settings.local.json +7 -0
- package/CHANGELOG.md +11 -0
- package/dist/common/extension/intunedExtensionServer.js +3 -0
- package/dist/common/extension/types.d.ts +49 -25
- package/dist/common/extension/types.js +3 -2
- package/dist/common/launchBrowser.js +5 -4
- package/dist/common/settingsSchema.d.ts +289 -21
- package/dist/common/settingsSchema.js +15 -2
- package/dist/runtime/captcha.js +15 -13
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# UNRELEASED
|
|
2
2
|
|
|
3
|
+
- add TikTok captcha auto-solver via SadCaptcha API (puzzle and rotate challenge types)
|
|
4
|
+
|
|
5
|
+
# 1.3.28
|
|
6
|
+
|
|
7
|
+
- accept and log captcha event messages from the browser extension, including Cloudflare Waiting Room progress
|
|
8
|
+
- add DataDome captcha solver configuration and event type support
|
|
9
|
+
|
|
10
|
+
# 1.3.27
|
|
11
|
+
|
|
12
|
+
- add profile templates support
|
|
13
|
+
|
|
3
14
|
# 1.3.26
|
|
4
15
|
|
|
5
16
|
- change default browser dimensions
|
|
@@ -75,6 +75,9 @@ class ExtensionServer {
|
|
|
75
75
|
details: result.error.flatten().fieldErrors
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
|
+
if (result.data.message) {
|
|
79
|
+
console.info(`Captcha event: tab=${result.data.tabId} type=${result.data.type} status=${result.data.status} message=${result.data.message}`);
|
|
80
|
+
}
|
|
78
81
|
await this.handleUpsertCaptcha(result.data);
|
|
79
82
|
return reply.code(200).send({});
|
|
80
83
|
} catch (error) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const captchaTypeSchema: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
|
|
2
|
+
export declare const captchaTypeSchema: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "datadome", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha", "tiktok"]>;
|
|
3
3
|
export type CaptchaType = z.infer<typeof captchaTypeSchema>;
|
|
4
4
|
export declare const captchaStatusSchema: z.ZodEnum<["attached", "solving", "solved", "error", "detached"]>;
|
|
5
5
|
export type CaptchaStatus = z.infer<typeof captchaStatusSchema>;
|
|
@@ -19,46 +19,53 @@ export type CaptchaError = z.infer<typeof captchaErrorSchema>;
|
|
|
19
19
|
declare const captchaBaseSchema: z.ZodObject<{
|
|
20
20
|
id: z.ZodString;
|
|
21
21
|
tabId: z.ZodNumber;
|
|
22
|
-
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
|
|
22
|
+
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "datadome", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha", "tiktok"]>;
|
|
23
23
|
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
message: z.ZodOptional<z.ZodString>;
|
|
24
25
|
}, "strip", z.ZodTypeAny, {
|
|
25
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
26
|
+
type: "aws" | "cloudflare" | "customcaptcha" | "datadome" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha" | "tiktok";
|
|
26
27
|
id: string;
|
|
27
28
|
tabId: number;
|
|
29
|
+
message?: string | undefined;
|
|
28
30
|
retryCount?: number | undefined;
|
|
29
31
|
}, {
|
|
30
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
32
|
+
type: "aws" | "cloudflare" | "customcaptcha" | "datadome" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha" | "tiktok";
|
|
31
33
|
id: string;
|
|
32
34
|
tabId: number;
|
|
35
|
+
message?: string | undefined;
|
|
33
36
|
retryCount?: number | undefined;
|
|
34
37
|
}>;
|
|
35
38
|
export type CaptchaBase = z.infer<typeof captchaBaseSchema>;
|
|
36
39
|
declare const captchaNonErrorSchema: z.ZodObject<{
|
|
37
40
|
id: z.ZodString;
|
|
38
41
|
tabId: z.ZodNumber;
|
|
39
|
-
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
|
|
42
|
+
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "datadome", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha", "tiktok"]>;
|
|
40
43
|
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
message: z.ZodOptional<z.ZodString>;
|
|
41
45
|
} & {
|
|
42
46
|
status: z.ZodEnum<["attached", "solving", "solved", "detached"]>;
|
|
43
47
|
}, "strip", z.ZodTypeAny, {
|
|
44
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
48
|
+
type: "aws" | "cloudflare" | "customcaptcha" | "datadome" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha" | "tiktok";
|
|
45
49
|
status: "attached" | "solving" | "solved" | "detached";
|
|
46
50
|
id: string;
|
|
47
51
|
tabId: number;
|
|
52
|
+
message?: string | undefined;
|
|
48
53
|
retryCount?: number | undefined;
|
|
49
54
|
}, {
|
|
50
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
55
|
+
type: "aws" | "cloudflare" | "customcaptcha" | "datadome" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha" | "tiktok";
|
|
51
56
|
status: "attached" | "solving" | "solved" | "detached";
|
|
52
57
|
id: string;
|
|
53
58
|
tabId: number;
|
|
59
|
+
message?: string | undefined;
|
|
54
60
|
retryCount?: number | undefined;
|
|
55
61
|
}>;
|
|
56
62
|
export type CaptchaNonError = z.infer<typeof captchaNonErrorSchema>;
|
|
57
63
|
declare const captchaErrorStatusSchema: z.ZodObject<{
|
|
58
64
|
id: z.ZodString;
|
|
59
65
|
tabId: z.ZodNumber;
|
|
60
|
-
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
|
|
66
|
+
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "datadome", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha", "tiktok"]>;
|
|
61
67
|
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
message: z.ZodOptional<z.ZodString>;
|
|
62
69
|
} & {
|
|
63
70
|
status: z.ZodLiteral<"error">;
|
|
64
71
|
error: z.ZodObject<{
|
|
@@ -76,104 +83,119 @@ declare const captchaErrorStatusSchema: z.ZodObject<{
|
|
|
76
83
|
code: "HIT_LIMIT" | "MAX_RETRIES" | "UNEXPECTED_SERVER_RESPONSE" | "UNEXPECTED_ERROR";
|
|
77
84
|
error?: unknown;
|
|
78
85
|
};
|
|
79
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
86
|
+
type: "aws" | "cloudflare" | "customcaptcha" | "datadome" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha" | "tiktok";
|
|
80
87
|
status: "error";
|
|
81
88
|
id: string;
|
|
82
89
|
tabId: number;
|
|
90
|
+
message?: string | undefined;
|
|
83
91
|
retryCount?: number | undefined;
|
|
84
92
|
}, {
|
|
85
93
|
error: {
|
|
86
94
|
code: "HIT_LIMIT" | "MAX_RETRIES" | "UNEXPECTED_SERVER_RESPONSE" | "UNEXPECTED_ERROR";
|
|
87
95
|
error?: unknown;
|
|
88
96
|
};
|
|
89
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
97
|
+
type: "aws" | "cloudflare" | "customcaptcha" | "datadome" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha" | "tiktok";
|
|
90
98
|
status: "error";
|
|
91
99
|
id: string;
|
|
92
100
|
tabId: number;
|
|
101
|
+
message?: string | undefined;
|
|
93
102
|
retryCount?: number | undefined;
|
|
94
103
|
}>;
|
|
95
104
|
export type CaptchaErrorStatus = z.infer<typeof captchaErrorStatusSchema>;
|
|
96
105
|
export declare const captchaSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
|
|
97
106
|
id: z.ZodString;
|
|
98
107
|
tabId: z.ZodNumber;
|
|
99
|
-
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
|
|
108
|
+
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "datadome", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha", "tiktok"]>;
|
|
100
109
|
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
110
|
+
message: z.ZodOptional<z.ZodString>;
|
|
101
111
|
} & {
|
|
102
112
|
status: z.ZodLiteral<"attached">;
|
|
103
113
|
}, "strip", z.ZodTypeAny, {
|
|
104
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
114
|
+
type: "aws" | "cloudflare" | "customcaptcha" | "datadome" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha" | "tiktok";
|
|
105
115
|
status: "attached";
|
|
106
116
|
id: string;
|
|
107
117
|
tabId: number;
|
|
118
|
+
message?: string | undefined;
|
|
108
119
|
retryCount?: number | undefined;
|
|
109
120
|
}, {
|
|
110
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
121
|
+
type: "aws" | "cloudflare" | "customcaptcha" | "datadome" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha" | "tiktok";
|
|
111
122
|
status: "attached";
|
|
112
123
|
id: string;
|
|
113
124
|
tabId: number;
|
|
125
|
+
message?: string | undefined;
|
|
114
126
|
retryCount?: number | undefined;
|
|
115
127
|
}>, z.ZodObject<{
|
|
116
128
|
id: z.ZodString;
|
|
117
129
|
tabId: z.ZodNumber;
|
|
118
|
-
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
|
|
130
|
+
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "datadome", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha", "tiktok"]>;
|
|
119
131
|
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
132
|
+
message: z.ZodOptional<z.ZodString>;
|
|
120
133
|
} & {
|
|
121
134
|
status: z.ZodLiteral<"solving">;
|
|
122
135
|
}, "strip", z.ZodTypeAny, {
|
|
123
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
136
|
+
type: "aws" | "cloudflare" | "customcaptcha" | "datadome" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha" | "tiktok";
|
|
124
137
|
status: "solving";
|
|
125
138
|
id: string;
|
|
126
139
|
tabId: number;
|
|
140
|
+
message?: string | undefined;
|
|
127
141
|
retryCount?: number | undefined;
|
|
128
142
|
}, {
|
|
129
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
143
|
+
type: "aws" | "cloudflare" | "customcaptcha" | "datadome" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha" | "tiktok";
|
|
130
144
|
status: "solving";
|
|
131
145
|
id: string;
|
|
132
146
|
tabId: number;
|
|
147
|
+
message?: string | undefined;
|
|
133
148
|
retryCount?: number | undefined;
|
|
134
149
|
}>, z.ZodObject<{
|
|
135
150
|
id: z.ZodString;
|
|
136
151
|
tabId: z.ZodNumber;
|
|
137
|
-
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
|
|
152
|
+
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "datadome", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha", "tiktok"]>;
|
|
138
153
|
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
154
|
+
message: z.ZodOptional<z.ZodString>;
|
|
139
155
|
} & {
|
|
140
156
|
status: z.ZodLiteral<"solved">;
|
|
141
157
|
}, "strip", z.ZodTypeAny, {
|
|
142
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
158
|
+
type: "aws" | "cloudflare" | "customcaptcha" | "datadome" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha" | "tiktok";
|
|
143
159
|
status: "solved";
|
|
144
160
|
id: string;
|
|
145
161
|
tabId: number;
|
|
162
|
+
message?: string | undefined;
|
|
146
163
|
retryCount?: number | undefined;
|
|
147
164
|
}, {
|
|
148
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
165
|
+
type: "aws" | "cloudflare" | "customcaptcha" | "datadome" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha" | "tiktok";
|
|
149
166
|
status: "solved";
|
|
150
167
|
id: string;
|
|
151
168
|
tabId: number;
|
|
169
|
+
message?: string | undefined;
|
|
152
170
|
retryCount?: number | undefined;
|
|
153
171
|
}>, z.ZodObject<{
|
|
154
172
|
id: z.ZodString;
|
|
155
173
|
tabId: z.ZodNumber;
|
|
156
|
-
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
|
|
174
|
+
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "datadome", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha", "tiktok"]>;
|
|
157
175
|
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
176
|
+
message: z.ZodOptional<z.ZodString>;
|
|
158
177
|
} & {
|
|
159
178
|
status: z.ZodLiteral<"detached">;
|
|
160
179
|
}, "strip", z.ZodTypeAny, {
|
|
161
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
180
|
+
type: "aws" | "cloudflare" | "customcaptcha" | "datadome" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha" | "tiktok";
|
|
162
181
|
status: "detached";
|
|
163
182
|
id: string;
|
|
164
183
|
tabId: number;
|
|
184
|
+
message?: string | undefined;
|
|
165
185
|
retryCount?: number | undefined;
|
|
166
186
|
}, {
|
|
167
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
187
|
+
type: "aws" | "cloudflare" | "customcaptcha" | "datadome" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha" | "tiktok";
|
|
168
188
|
status: "detached";
|
|
169
189
|
id: string;
|
|
170
190
|
tabId: number;
|
|
191
|
+
message?: string | undefined;
|
|
171
192
|
retryCount?: number | undefined;
|
|
172
193
|
}>, z.ZodObject<{
|
|
173
194
|
id: z.ZodString;
|
|
174
195
|
tabId: z.ZodNumber;
|
|
175
|
-
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
|
|
196
|
+
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "datadome", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha", "tiktok"]>;
|
|
176
197
|
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
198
|
+
message: z.ZodOptional<z.ZodString>;
|
|
177
199
|
} & {
|
|
178
200
|
status: z.ZodLiteral<"error">;
|
|
179
201
|
error: z.ZodObject<{
|
|
@@ -191,20 +213,22 @@ export declare const captchaSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObje
|
|
|
191
213
|
code: "HIT_LIMIT" | "MAX_RETRIES" | "UNEXPECTED_SERVER_RESPONSE" | "UNEXPECTED_ERROR";
|
|
192
214
|
error?: unknown;
|
|
193
215
|
};
|
|
194
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
216
|
+
type: "aws" | "cloudflare" | "customcaptcha" | "datadome" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha" | "tiktok";
|
|
195
217
|
status: "error";
|
|
196
218
|
id: string;
|
|
197
219
|
tabId: number;
|
|
220
|
+
message?: string | undefined;
|
|
198
221
|
retryCount?: number | undefined;
|
|
199
222
|
}, {
|
|
200
223
|
error: {
|
|
201
224
|
code: "HIT_LIMIT" | "MAX_RETRIES" | "UNEXPECTED_SERVER_RESPONSE" | "UNEXPECTED_ERROR";
|
|
202
225
|
error?: unknown;
|
|
203
226
|
};
|
|
204
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
227
|
+
type: "aws" | "cloudflare" | "customcaptcha" | "datadome" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha" | "tiktok";
|
|
205
228
|
status: "error";
|
|
206
229
|
id: string;
|
|
207
230
|
tabId: number;
|
|
231
|
+
message?: string | undefined;
|
|
208
232
|
retryCount?: number | undefined;
|
|
209
233
|
}>]>;
|
|
210
234
|
export type Captcha = z.infer<typeof captchaSchema>;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.captchaTypeSchema = exports.captchaStatusSchema = exports.captchaSchema = exports.captchaErrorSchema = exports.captchaErrorCodeSchema = exports.TimeoutError = exports.CaptchaSolveError = void 0;
|
|
7
7
|
var _zod = require("zod");
|
|
8
|
-
const captchaTypeSchema = exports.captchaTypeSchema = _zod.z.enum(["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]);
|
|
8
|
+
const captchaTypeSchema = exports.captchaTypeSchema = _zod.z.enum(["aws", "cloudflare", "customcaptcha", "datadome", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha", "tiktok"]);
|
|
9
9
|
const captchaStatusSchema = exports.captchaStatusSchema = _zod.z.enum(["attached", "solving", "solved", "error", "detached"]);
|
|
10
10
|
const captchaErrorCodeSchema = exports.captchaErrorCodeSchema = _zod.z.enum(["HIT_LIMIT", "MAX_RETRIES", "UNEXPECTED_SERVER_RESPONSE", "UNEXPECTED_ERROR"]);
|
|
11
11
|
const captchaErrorSchema = exports.captchaErrorSchema = _zod.z.object({
|
|
@@ -16,7 +16,8 @@ const captchaBaseSchema = _zod.z.object({
|
|
|
16
16
|
id: _zod.z.string().min(1),
|
|
17
17
|
tabId: _zod.z.number().int().positive(),
|
|
18
18
|
type: captchaTypeSchema,
|
|
19
|
-
retryCount: _zod.z.number().int().nonnegative().optional()
|
|
19
|
+
retryCount: _zod.z.number().int().nonnegative().optional(),
|
|
20
|
+
message: _zod.z.string().optional()
|
|
20
21
|
});
|
|
21
22
|
const captchaNonErrorSchema = captchaBaseSchema.extend({
|
|
22
23
|
status: captchaStatusSchema.exclude(["error"])
|
|
@@ -191,10 +191,7 @@ async function launchChromium(options) {
|
|
|
191
191
|
if (appModeInitialUrl) {
|
|
192
192
|
extraArgs.push(`--app=${appModeInitialUrl}`);
|
|
193
193
|
}
|
|
194
|
-
if (
|
|
195
|
-
const stealthExecutablePath = await getIntunedBrowserExecutablePath();
|
|
196
|
-
executablePath = stealthExecutablePath;
|
|
197
|
-
} else if (executablePath) {
|
|
194
|
+
if (executablePath) {
|
|
198
195
|
executablePath = await fs.realpath(executablePath);
|
|
199
196
|
if (!(await fs.exists(executablePath))) {
|
|
200
197
|
console.log(`Warning: Executable path ${executablePath} does not exist. Falling back to default.`);
|
|
@@ -262,6 +259,10 @@ async function getBrowserExecutablePath() {
|
|
|
262
259
|
if (browserType === "brave") {
|
|
263
260
|
return await getBraveExecutablePath();
|
|
264
261
|
}
|
|
262
|
+
const stealthConfig = await (0, _intunedJson.getStealthModeConfig)();
|
|
263
|
+
if (stealthConfig.enabled) {
|
|
264
|
+
return await getIntunedBrowserExecutablePath();
|
|
265
|
+
}
|
|
265
266
|
}
|
|
266
267
|
async function launchBrowser(options) {
|
|
267
268
|
if ("cdpAddress" in options) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
-
export declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
2
|
+
export declare const captchaSolverSettingsSchema: z.ZodEffects<z.ZodDefault<z.ZodObject<{
|
|
3
3
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
4
4
|
port: z.ZodOptional<z.ZodNumber>;
|
|
5
5
|
cloudflare: z.ZodOptional<z.ZodObject<{
|
|
@@ -9,14 +9,14 @@ export declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
|
9
9
|
}, {
|
|
10
10
|
enabled: boolean;
|
|
11
11
|
}>>;
|
|
12
|
-
|
|
12
|
+
googleRecaptcha: z.ZodOptional<z.ZodObject<{
|
|
13
13
|
enabled: z.ZodBoolean;
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
15
|
enabled: boolean;
|
|
16
16
|
}, {
|
|
17
17
|
enabled: boolean;
|
|
18
18
|
}>>;
|
|
19
|
-
|
|
19
|
+
googleRecaptchaV2: z.ZodOptional<z.ZodObject<{
|
|
20
20
|
enabled: z.ZodBoolean;
|
|
21
21
|
}, "strip", z.ZodTypeAny, {
|
|
22
22
|
enabled: boolean;
|
|
@@ -30,6 +30,13 @@ export declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
|
30
30
|
}, {
|
|
31
31
|
enabled: boolean;
|
|
32
32
|
}>>;
|
|
33
|
+
datadome: z.ZodOptional<z.ZodObject<{
|
|
34
|
+
enabled: z.ZodBoolean;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
enabled: boolean;
|
|
37
|
+
}, {
|
|
38
|
+
enabled: boolean;
|
|
39
|
+
}>>;
|
|
33
40
|
hcaptcha: z.ZodOptional<z.ZodObject<{
|
|
34
41
|
enabled: z.ZodBoolean;
|
|
35
42
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -58,6 +65,13 @@ export declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
|
58
65
|
}, {
|
|
59
66
|
enabled: boolean;
|
|
60
67
|
}>>;
|
|
68
|
+
tiktok: z.ZodOptional<z.ZodObject<{
|
|
69
|
+
enabled: z.ZodBoolean;
|
|
70
|
+
}, "strip", z.ZodTypeAny, {
|
|
71
|
+
enabled: boolean;
|
|
72
|
+
}, {
|
|
73
|
+
enabled: boolean;
|
|
74
|
+
}>>;
|
|
61
75
|
customCaptcha: z.ZodOptional<z.ZodObject<{
|
|
62
76
|
enabled: z.ZodBoolean;
|
|
63
77
|
} & {
|
|
@@ -119,6 +133,9 @@ export declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
|
119
133
|
cloudflare?: {
|
|
120
134
|
enabled: boolean;
|
|
121
135
|
} | undefined;
|
|
136
|
+
datadome?: {
|
|
137
|
+
enabled: boolean;
|
|
138
|
+
} | undefined;
|
|
122
139
|
funcaptcha?: {
|
|
123
140
|
enabled: boolean;
|
|
124
141
|
} | undefined;
|
|
@@ -128,11 +145,14 @@ export declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
|
128
145
|
hcaptcha?: {
|
|
129
146
|
enabled: boolean;
|
|
130
147
|
} | undefined;
|
|
148
|
+
tiktok?: {
|
|
149
|
+
enabled: boolean;
|
|
150
|
+
} | undefined;
|
|
131
151
|
port?: number | undefined;
|
|
132
|
-
|
|
152
|
+
googleRecaptcha?: {
|
|
133
153
|
enabled: boolean;
|
|
134
154
|
} | undefined;
|
|
135
|
-
|
|
155
|
+
googleRecaptchaV2?: {
|
|
136
156
|
enabled: boolean;
|
|
137
157
|
} | undefined;
|
|
138
158
|
awscaptcha?: {
|
|
@@ -157,6 +177,9 @@ export declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
|
157
177
|
cloudflare?: {
|
|
158
178
|
enabled: boolean;
|
|
159
179
|
} | undefined;
|
|
180
|
+
datadome?: {
|
|
181
|
+
enabled: boolean;
|
|
182
|
+
} | undefined;
|
|
160
183
|
funcaptcha?: {
|
|
161
184
|
enabled: boolean;
|
|
162
185
|
} | undefined;
|
|
@@ -166,12 +189,117 @@ export declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
|
166
189
|
hcaptcha?: {
|
|
167
190
|
enabled: boolean;
|
|
168
191
|
} | undefined;
|
|
192
|
+
tiktok?: {
|
|
193
|
+
enabled: boolean;
|
|
194
|
+
} | undefined;
|
|
169
195
|
enabled?: boolean | undefined;
|
|
170
196
|
port?: number | undefined;
|
|
197
|
+
googleRecaptcha?: {
|
|
198
|
+
enabled: boolean;
|
|
199
|
+
} | undefined;
|
|
171
200
|
googleRecaptchaV2?: {
|
|
172
201
|
enabled: boolean;
|
|
173
202
|
} | undefined;
|
|
174
|
-
|
|
203
|
+
awscaptcha?: {
|
|
204
|
+
enabled: boolean;
|
|
205
|
+
} | undefined;
|
|
206
|
+
lemin?: {
|
|
207
|
+
enabled: boolean;
|
|
208
|
+
} | undefined;
|
|
209
|
+
customCaptcha?: {
|
|
210
|
+
enabled: boolean;
|
|
211
|
+
imageLocators: string[];
|
|
212
|
+
submitLocators: string[];
|
|
213
|
+
inputLocators: string[];
|
|
214
|
+
} | undefined;
|
|
215
|
+
text?: {
|
|
216
|
+
enabled: boolean;
|
|
217
|
+
submitLocators: string[];
|
|
218
|
+
inputLocators: string[];
|
|
219
|
+
labelLocators: string[];
|
|
220
|
+
} | undefined;
|
|
221
|
+
settings?: {
|
|
222
|
+
autoSolve?: boolean | undefined;
|
|
223
|
+
solveDelay?: number | undefined;
|
|
224
|
+
maxRetries?: number | undefined;
|
|
225
|
+
timeout?: number | undefined;
|
|
226
|
+
} | undefined;
|
|
227
|
+
}>>, {
|
|
228
|
+
googleRecaptcha: {
|
|
229
|
+
enabled: boolean;
|
|
230
|
+
} | undefined;
|
|
231
|
+
googleRecaptchaV2: {
|
|
232
|
+
enabled: boolean;
|
|
233
|
+
} | undefined;
|
|
234
|
+
enabled: boolean;
|
|
235
|
+
settings: {
|
|
236
|
+
autoSolve: boolean;
|
|
237
|
+
solveDelay: number;
|
|
238
|
+
maxRetries: number;
|
|
239
|
+
timeout: number;
|
|
240
|
+
};
|
|
241
|
+
cloudflare?: {
|
|
242
|
+
enabled: boolean;
|
|
243
|
+
} | undefined;
|
|
244
|
+
datadome?: {
|
|
245
|
+
enabled: boolean;
|
|
246
|
+
} | undefined;
|
|
247
|
+
funcaptcha?: {
|
|
248
|
+
enabled: boolean;
|
|
249
|
+
} | undefined;
|
|
250
|
+
geetest?: {
|
|
251
|
+
enabled: boolean;
|
|
252
|
+
} | undefined;
|
|
253
|
+
hcaptcha?: {
|
|
254
|
+
enabled: boolean;
|
|
255
|
+
} | undefined;
|
|
256
|
+
tiktok?: {
|
|
257
|
+
enabled: boolean;
|
|
258
|
+
} | undefined;
|
|
259
|
+
port?: number | undefined;
|
|
260
|
+
awscaptcha?: {
|
|
261
|
+
enabled: boolean;
|
|
262
|
+
} | undefined;
|
|
263
|
+
lemin?: {
|
|
264
|
+
enabled: boolean;
|
|
265
|
+
} | undefined;
|
|
266
|
+
customCaptcha?: {
|
|
267
|
+
enabled: boolean;
|
|
268
|
+
imageLocators: string[];
|
|
269
|
+
submitLocators: string[];
|
|
270
|
+
inputLocators: string[];
|
|
271
|
+
} | undefined;
|
|
272
|
+
text?: {
|
|
273
|
+
enabled: boolean;
|
|
274
|
+
submitLocators: string[];
|
|
275
|
+
inputLocators: string[];
|
|
276
|
+
labelLocators: string[];
|
|
277
|
+
} | undefined;
|
|
278
|
+
}, {
|
|
279
|
+
cloudflare?: {
|
|
280
|
+
enabled: boolean;
|
|
281
|
+
} | undefined;
|
|
282
|
+
datadome?: {
|
|
283
|
+
enabled: boolean;
|
|
284
|
+
} | undefined;
|
|
285
|
+
funcaptcha?: {
|
|
286
|
+
enabled: boolean;
|
|
287
|
+
} | undefined;
|
|
288
|
+
geetest?: {
|
|
289
|
+
enabled: boolean;
|
|
290
|
+
} | undefined;
|
|
291
|
+
hcaptcha?: {
|
|
292
|
+
enabled: boolean;
|
|
293
|
+
} | undefined;
|
|
294
|
+
tiktok?: {
|
|
295
|
+
enabled: boolean;
|
|
296
|
+
} | undefined;
|
|
297
|
+
enabled?: boolean | undefined;
|
|
298
|
+
port?: number | undefined;
|
|
299
|
+
googleRecaptcha?: {
|
|
300
|
+
enabled: boolean;
|
|
301
|
+
} | undefined;
|
|
302
|
+
googleRecaptchaV2?: {
|
|
175
303
|
enabled: boolean;
|
|
176
304
|
} | undefined;
|
|
177
305
|
awscaptcha?: {
|
|
@@ -198,7 +326,7 @@ export declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
|
198
326
|
maxRetries?: number | undefined;
|
|
199
327
|
timeout?: number | undefined;
|
|
200
328
|
} | undefined;
|
|
201
|
-
}
|
|
329
|
+
} | undefined>;
|
|
202
330
|
export type CaptchaSolverSettings = z.infer<typeof captchaSolverSettingsSchema>;
|
|
203
331
|
export type CaptchaSolverSettingsWithRunContext = CaptchaSolverSettings & {
|
|
204
332
|
workspaceId: string;
|
|
@@ -227,7 +355,7 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
227
355
|
}, {
|
|
228
356
|
enabled: boolean;
|
|
229
357
|
}>>>;
|
|
230
|
-
captchaSolver: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
358
|
+
captchaSolver: z.ZodOptional<z.ZodEffects<z.ZodDefault<z.ZodObject<{
|
|
231
359
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
232
360
|
port: z.ZodOptional<z.ZodNumber>;
|
|
233
361
|
cloudflare: z.ZodOptional<z.ZodObject<{
|
|
@@ -237,14 +365,14 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
237
365
|
}, {
|
|
238
366
|
enabled: boolean;
|
|
239
367
|
}>>;
|
|
240
|
-
|
|
368
|
+
googleRecaptcha: z.ZodOptional<z.ZodObject<{
|
|
241
369
|
enabled: z.ZodBoolean;
|
|
242
370
|
}, "strip", z.ZodTypeAny, {
|
|
243
371
|
enabled: boolean;
|
|
244
372
|
}, {
|
|
245
373
|
enabled: boolean;
|
|
246
374
|
}>>;
|
|
247
|
-
|
|
375
|
+
googleRecaptchaV2: z.ZodOptional<z.ZodObject<{
|
|
248
376
|
enabled: z.ZodBoolean;
|
|
249
377
|
}, "strip", z.ZodTypeAny, {
|
|
250
378
|
enabled: boolean;
|
|
@@ -258,6 +386,13 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
258
386
|
}, {
|
|
259
387
|
enabled: boolean;
|
|
260
388
|
}>>;
|
|
389
|
+
datadome: z.ZodOptional<z.ZodObject<{
|
|
390
|
+
enabled: z.ZodBoolean;
|
|
391
|
+
}, "strip", z.ZodTypeAny, {
|
|
392
|
+
enabled: boolean;
|
|
393
|
+
}, {
|
|
394
|
+
enabled: boolean;
|
|
395
|
+
}>>;
|
|
261
396
|
hcaptcha: z.ZodOptional<z.ZodObject<{
|
|
262
397
|
enabled: z.ZodBoolean;
|
|
263
398
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -286,6 +421,13 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
286
421
|
}, {
|
|
287
422
|
enabled: boolean;
|
|
288
423
|
}>>;
|
|
424
|
+
tiktok: z.ZodOptional<z.ZodObject<{
|
|
425
|
+
enabled: z.ZodBoolean;
|
|
426
|
+
}, "strip", z.ZodTypeAny, {
|
|
427
|
+
enabled: boolean;
|
|
428
|
+
}, {
|
|
429
|
+
enabled: boolean;
|
|
430
|
+
}>>;
|
|
289
431
|
customCaptcha: z.ZodOptional<z.ZodObject<{
|
|
290
432
|
enabled: z.ZodBoolean;
|
|
291
433
|
} & {
|
|
@@ -347,6 +489,9 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
347
489
|
cloudflare?: {
|
|
348
490
|
enabled: boolean;
|
|
349
491
|
} | undefined;
|
|
492
|
+
datadome?: {
|
|
493
|
+
enabled: boolean;
|
|
494
|
+
} | undefined;
|
|
350
495
|
funcaptcha?: {
|
|
351
496
|
enabled: boolean;
|
|
352
497
|
} | undefined;
|
|
@@ -356,11 +501,14 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
356
501
|
hcaptcha?: {
|
|
357
502
|
enabled: boolean;
|
|
358
503
|
} | undefined;
|
|
504
|
+
tiktok?: {
|
|
505
|
+
enabled: boolean;
|
|
506
|
+
} | undefined;
|
|
359
507
|
port?: number | undefined;
|
|
360
|
-
|
|
508
|
+
googleRecaptcha?: {
|
|
361
509
|
enabled: boolean;
|
|
362
510
|
} | undefined;
|
|
363
|
-
|
|
511
|
+
googleRecaptchaV2?: {
|
|
364
512
|
enabled: boolean;
|
|
365
513
|
} | undefined;
|
|
366
514
|
awscaptcha?: {
|
|
@@ -385,6 +533,9 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
385
533
|
cloudflare?: {
|
|
386
534
|
enabled: boolean;
|
|
387
535
|
} | undefined;
|
|
536
|
+
datadome?: {
|
|
537
|
+
enabled: boolean;
|
|
538
|
+
} | undefined;
|
|
388
539
|
funcaptcha?: {
|
|
389
540
|
enabled: boolean;
|
|
390
541
|
} | undefined;
|
|
@@ -394,12 +545,117 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
394
545
|
hcaptcha?: {
|
|
395
546
|
enabled: boolean;
|
|
396
547
|
} | undefined;
|
|
548
|
+
tiktok?: {
|
|
549
|
+
enabled: boolean;
|
|
550
|
+
} | undefined;
|
|
397
551
|
enabled?: boolean | undefined;
|
|
398
552
|
port?: number | undefined;
|
|
553
|
+
googleRecaptcha?: {
|
|
554
|
+
enabled: boolean;
|
|
555
|
+
} | undefined;
|
|
399
556
|
googleRecaptchaV2?: {
|
|
400
557
|
enabled: boolean;
|
|
401
558
|
} | undefined;
|
|
402
|
-
|
|
559
|
+
awscaptcha?: {
|
|
560
|
+
enabled: boolean;
|
|
561
|
+
} | undefined;
|
|
562
|
+
lemin?: {
|
|
563
|
+
enabled: boolean;
|
|
564
|
+
} | undefined;
|
|
565
|
+
customCaptcha?: {
|
|
566
|
+
enabled: boolean;
|
|
567
|
+
imageLocators: string[];
|
|
568
|
+
submitLocators: string[];
|
|
569
|
+
inputLocators: string[];
|
|
570
|
+
} | undefined;
|
|
571
|
+
text?: {
|
|
572
|
+
enabled: boolean;
|
|
573
|
+
submitLocators: string[];
|
|
574
|
+
inputLocators: string[];
|
|
575
|
+
labelLocators: string[];
|
|
576
|
+
} | undefined;
|
|
577
|
+
settings?: {
|
|
578
|
+
autoSolve?: boolean | undefined;
|
|
579
|
+
solveDelay?: number | undefined;
|
|
580
|
+
maxRetries?: number | undefined;
|
|
581
|
+
timeout?: number | undefined;
|
|
582
|
+
} | undefined;
|
|
583
|
+
}>>, {
|
|
584
|
+
googleRecaptcha: {
|
|
585
|
+
enabled: boolean;
|
|
586
|
+
} | undefined;
|
|
587
|
+
googleRecaptchaV2: {
|
|
588
|
+
enabled: boolean;
|
|
589
|
+
} | undefined;
|
|
590
|
+
enabled: boolean;
|
|
591
|
+
settings: {
|
|
592
|
+
autoSolve: boolean;
|
|
593
|
+
solveDelay: number;
|
|
594
|
+
maxRetries: number;
|
|
595
|
+
timeout: number;
|
|
596
|
+
};
|
|
597
|
+
cloudflare?: {
|
|
598
|
+
enabled: boolean;
|
|
599
|
+
} | undefined;
|
|
600
|
+
datadome?: {
|
|
601
|
+
enabled: boolean;
|
|
602
|
+
} | undefined;
|
|
603
|
+
funcaptcha?: {
|
|
604
|
+
enabled: boolean;
|
|
605
|
+
} | undefined;
|
|
606
|
+
geetest?: {
|
|
607
|
+
enabled: boolean;
|
|
608
|
+
} | undefined;
|
|
609
|
+
hcaptcha?: {
|
|
610
|
+
enabled: boolean;
|
|
611
|
+
} | undefined;
|
|
612
|
+
tiktok?: {
|
|
613
|
+
enabled: boolean;
|
|
614
|
+
} | undefined;
|
|
615
|
+
port?: number | undefined;
|
|
616
|
+
awscaptcha?: {
|
|
617
|
+
enabled: boolean;
|
|
618
|
+
} | undefined;
|
|
619
|
+
lemin?: {
|
|
620
|
+
enabled: boolean;
|
|
621
|
+
} | undefined;
|
|
622
|
+
customCaptcha?: {
|
|
623
|
+
enabled: boolean;
|
|
624
|
+
imageLocators: string[];
|
|
625
|
+
submitLocators: string[];
|
|
626
|
+
inputLocators: string[];
|
|
627
|
+
} | undefined;
|
|
628
|
+
text?: {
|
|
629
|
+
enabled: boolean;
|
|
630
|
+
submitLocators: string[];
|
|
631
|
+
inputLocators: string[];
|
|
632
|
+
labelLocators: string[];
|
|
633
|
+
} | undefined;
|
|
634
|
+
}, {
|
|
635
|
+
cloudflare?: {
|
|
636
|
+
enabled: boolean;
|
|
637
|
+
} | undefined;
|
|
638
|
+
datadome?: {
|
|
639
|
+
enabled: boolean;
|
|
640
|
+
} | undefined;
|
|
641
|
+
funcaptcha?: {
|
|
642
|
+
enabled: boolean;
|
|
643
|
+
} | undefined;
|
|
644
|
+
geetest?: {
|
|
645
|
+
enabled: boolean;
|
|
646
|
+
} | undefined;
|
|
647
|
+
hcaptcha?: {
|
|
648
|
+
enabled: boolean;
|
|
649
|
+
} | undefined;
|
|
650
|
+
tiktok?: {
|
|
651
|
+
enabled: boolean;
|
|
652
|
+
} | undefined;
|
|
653
|
+
enabled?: boolean | undefined;
|
|
654
|
+
port?: number | undefined;
|
|
655
|
+
googleRecaptcha?: {
|
|
656
|
+
enabled: boolean;
|
|
657
|
+
} | undefined;
|
|
658
|
+
googleRecaptchaV2?: {
|
|
403
659
|
enabled: boolean;
|
|
404
660
|
} | undefined;
|
|
405
661
|
awscaptcha?: {
|
|
@@ -426,7 +682,7 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
426
682
|
maxRetries?: number | undefined;
|
|
427
683
|
timeout?: number | undefined;
|
|
428
684
|
} | undefined;
|
|
429
|
-
}
|
|
685
|
+
} | undefined>>;
|
|
430
686
|
}, "strip", z.ZodTypeAny, {
|
|
431
687
|
authSessions: {
|
|
432
688
|
enabled: boolean;
|
|
@@ -435,6 +691,12 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
435
691
|
enabled: boolean;
|
|
436
692
|
};
|
|
437
693
|
captchaSolver?: {
|
|
694
|
+
googleRecaptcha: {
|
|
695
|
+
enabled: boolean;
|
|
696
|
+
} | undefined;
|
|
697
|
+
googleRecaptchaV2: {
|
|
698
|
+
enabled: boolean;
|
|
699
|
+
} | undefined;
|
|
438
700
|
enabled: boolean;
|
|
439
701
|
settings: {
|
|
440
702
|
autoSolve: boolean;
|
|
@@ -445,6 +707,9 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
445
707
|
cloudflare?: {
|
|
446
708
|
enabled: boolean;
|
|
447
709
|
} | undefined;
|
|
710
|
+
datadome?: {
|
|
711
|
+
enabled: boolean;
|
|
712
|
+
} | undefined;
|
|
448
713
|
funcaptcha?: {
|
|
449
714
|
enabled: boolean;
|
|
450
715
|
} | undefined;
|
|
@@ -454,13 +719,10 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
454
719
|
hcaptcha?: {
|
|
455
720
|
enabled: boolean;
|
|
456
721
|
} | undefined;
|
|
457
|
-
|
|
458
|
-
googleRecaptchaV2?: {
|
|
459
|
-
enabled: boolean;
|
|
460
|
-
} | undefined;
|
|
461
|
-
googleRecaptchaV3?: {
|
|
722
|
+
tiktok?: {
|
|
462
723
|
enabled: boolean;
|
|
463
724
|
} | undefined;
|
|
725
|
+
port?: number | undefined;
|
|
464
726
|
awscaptcha?: {
|
|
465
727
|
enabled: boolean;
|
|
466
728
|
} | undefined;
|
|
@@ -491,6 +753,9 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
491
753
|
cloudflare?: {
|
|
492
754
|
enabled: boolean;
|
|
493
755
|
} | undefined;
|
|
756
|
+
datadome?: {
|
|
757
|
+
enabled: boolean;
|
|
758
|
+
} | undefined;
|
|
494
759
|
funcaptcha?: {
|
|
495
760
|
enabled: boolean;
|
|
496
761
|
} | undefined;
|
|
@@ -500,12 +765,15 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
500
765
|
hcaptcha?: {
|
|
501
766
|
enabled: boolean;
|
|
502
767
|
} | undefined;
|
|
768
|
+
tiktok?: {
|
|
769
|
+
enabled: boolean;
|
|
770
|
+
} | undefined;
|
|
503
771
|
enabled?: boolean | undefined;
|
|
504
772
|
port?: number | undefined;
|
|
505
|
-
|
|
773
|
+
googleRecaptcha?: {
|
|
506
774
|
enabled: boolean;
|
|
507
775
|
} | undefined;
|
|
508
|
-
|
|
776
|
+
googleRecaptchaV2?: {
|
|
509
777
|
enabled: boolean;
|
|
510
778
|
} | undefined;
|
|
511
779
|
awscaptcha?: {
|
|
@@ -29,17 +29,30 @@ const captchaSolverSettingsSchema = exports.captchaSolverSettingsSchema = z.obje
|
|
|
29
29
|
enabled: z.boolean().default(false),
|
|
30
30
|
port: z.number().int().min(1).max(65535).optional(),
|
|
31
31
|
cloudflare: baseCaptchaSchema.optional(),
|
|
32
|
+
googleRecaptcha: baseCaptchaSchema.optional(),
|
|
32
33
|
googleRecaptchaV2: baseCaptchaSchema.optional(),
|
|
33
|
-
googleRecaptchaV3: baseCaptchaSchema.optional(),
|
|
34
34
|
awscaptcha: baseCaptchaSchema.optional(),
|
|
35
|
+
datadome: baseCaptchaSchema.optional(),
|
|
35
36
|
hcaptcha: baseCaptchaSchema.optional(),
|
|
36
37
|
funcaptcha: baseCaptchaSchema.optional(),
|
|
37
38
|
geetest: baseCaptchaSchema.optional(),
|
|
38
39
|
lemin: baseCaptchaSchema.optional(),
|
|
40
|
+
tiktok: baseCaptchaSchema.optional(),
|
|
39
41
|
customCaptcha: customCaptchaSchema.optional(),
|
|
40
42
|
text: textCaptchaSchema.optional(),
|
|
41
43
|
settings: captchaSolverSolveSettingsSchema.default(captchaSolverSolveSettingsSchema.parse({}))
|
|
42
|
-
}).default({})
|
|
44
|
+
}).default({}).transform(({
|
|
45
|
+
googleRecaptchaV2,
|
|
46
|
+
googleRecaptcha,
|
|
47
|
+
...rest
|
|
48
|
+
}) => {
|
|
49
|
+
const value = googleRecaptcha ?? googleRecaptchaV2;
|
|
50
|
+
return {
|
|
51
|
+
...rest,
|
|
52
|
+
googleRecaptcha: value,
|
|
53
|
+
googleRecaptchaV2: value
|
|
54
|
+
};
|
|
55
|
+
});
|
|
43
56
|
const authSessionsSchema = z.object({
|
|
44
57
|
enabled: z.boolean()
|
|
45
58
|
}).optional().default({
|
package/dist/runtime/captcha.js
CHANGED
|
@@ -20,7 +20,7 @@ async function withWaitForCaptchaSolve(callback, options) {
|
|
|
20
20
|
settleDurationMs = 5_000,
|
|
21
21
|
waitForNetworkSettled = true
|
|
22
22
|
} = options;
|
|
23
|
-
console.
|
|
23
|
+
console.info(`Starting captcha solve wait (timeout=${timeoutInMs}ms, settleDuration=${settleDurationMs}ms, waitForNetworkSettled=${waitForNetworkSettled})`);
|
|
24
24
|
const extensionServer = (0, _intunedExtensionServer.getIntunedExtensionServer)();
|
|
25
25
|
let settledResolve = null;
|
|
26
26
|
let settledPromise = new Promise(resolve => {
|
|
@@ -40,19 +40,21 @@ async function withWaitForCaptchaSolve(callback, options) {
|
|
|
40
40
|
const onCaptchaUpdate = async _captcha => {
|
|
41
41
|
const solvingCaptchas = await extensionServer.getCaptchas(page, "solving");
|
|
42
42
|
const errorCaptchas = await extensionServer.getCaptchas(page, "error");
|
|
43
|
-
console.
|
|
43
|
+
console.debug(`Captcha update received: solving=${solvingCaptchas.length}, errors=${errorCaptchas.length}`);
|
|
44
44
|
if (solvingCaptchas.length > 0) {
|
|
45
|
+
if (!captchasAppeared) {
|
|
46
|
+
console.info(`Captchas detected: ${solvingCaptchas.map(c => c.id).join(", ")}`);
|
|
47
|
+
}
|
|
45
48
|
captchasAppeared = true;
|
|
46
|
-
console.error(`Captchas detected: ${solvingCaptchas.map(c => c.id).join(", ")}`);
|
|
47
49
|
}
|
|
48
50
|
if (errorCaptchas.length > 0) {
|
|
49
51
|
error = errorCaptchas[0].error;
|
|
50
|
-
console.
|
|
52
|
+
console.info(`Captcha error detected: ${error?.code}`);
|
|
51
53
|
await maybeSettle();
|
|
52
54
|
return;
|
|
53
55
|
}
|
|
54
56
|
if (solvingCaptchas.length === 0) {
|
|
55
|
-
console.
|
|
57
|
+
console.debug("No pending captchas, settling");
|
|
56
58
|
await maybeSettle();
|
|
57
59
|
}
|
|
58
60
|
};
|
|
@@ -68,7 +70,7 @@ async function withWaitForCaptchaSolve(callback, options) {
|
|
|
68
70
|
const timeoutPromise = new Promise(resolve => {
|
|
69
71
|
setTimeout(() => {
|
|
70
72
|
isTimeout = true;
|
|
71
|
-
console.
|
|
73
|
+
console.info("Captcha solve timeout reached");
|
|
72
74
|
settledResolve?.();
|
|
73
75
|
resolve();
|
|
74
76
|
}, timeoutInMs);
|
|
@@ -76,7 +78,7 @@ async function withWaitForCaptchaSolve(callback, options) {
|
|
|
76
78
|
await extensionServer.subscribe(page, onCaptchaUpdate);
|
|
77
79
|
try {
|
|
78
80
|
const initialPending = await getPendingCaptchas();
|
|
79
|
-
console.
|
|
81
|
+
console.info(`Found ${initialPending.length} ongoing captchas`);
|
|
80
82
|
if (initialPending.length > 0) {
|
|
81
83
|
captchasAppeared = true;
|
|
82
84
|
}
|
|
@@ -84,24 +86,24 @@ async function withWaitForCaptchaSolve(callback, options) {
|
|
|
84
86
|
let shouldContinue = true;
|
|
85
87
|
while (shouldContinue) {
|
|
86
88
|
await Promise.race([settledPromise, timeoutPromise]);
|
|
87
|
-
console.
|
|
89
|
+
console.debug(`Settled event received, waiting ${settleDurationMs}ms before checking`);
|
|
88
90
|
await new Promise(r => setTimeout(r, settleDurationMs));
|
|
89
91
|
if (error) {
|
|
90
|
-
console.
|
|
92
|
+
console.info(`Raising captcha error: ${error.code}`);
|
|
91
93
|
throw new _types.CaptchaSolveError(`CAPTCHA Solve Error: ${error.code}`, error);
|
|
92
94
|
}
|
|
93
95
|
const noPendingCaptchas = await hasNoPendingCaptchas();
|
|
94
96
|
const pending = await getPendingCaptchas();
|
|
95
|
-
console.
|
|
97
|
+
console.debug(`Check point: actionDone=${actionDone}, noPendingCaptchas=${noPendingCaptchas}, isTimeout=${isTimeout}, pendingCount=${pending.length}`);
|
|
96
98
|
if (actionDone && noPendingCaptchas || isTimeout) {
|
|
97
99
|
if (isTimeout && !noPendingCaptchas) {
|
|
98
|
-
console.
|
|
100
|
+
console.info(`Timeout with ${pending.length} pending captchas`);
|
|
99
101
|
throw new _types.TimeoutError("CAPTCHA Solve timed out with pending captchas.");
|
|
100
102
|
}
|
|
101
|
-
console.
|
|
103
|
+
console.info("Captcha solve completed successfully");
|
|
102
104
|
shouldContinue = false;
|
|
103
105
|
} else {
|
|
104
|
-
console.
|
|
106
|
+
console.info(`Still have ${pending.length} pending captchas, waiting for more updates`);
|
|
105
107
|
settledPromise = new Promise(resolve => {
|
|
106
108
|
settledResolve = resolve;
|
|
107
109
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intuned/runtime-dev",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.29-stealth.0",
|
|
4
4
|
"description": "Intuned runtime",
|
|
5
5
|
"packageManager": "yarn@4.12.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"commander": "14.0.0",
|
|
75
75
|
"cross-fetch": "^4.0.0",
|
|
76
76
|
"dotenv": "^16.3.1",
|
|
77
|
-
"fastify": "
|
|
77
|
+
"fastify": "5.8.5",
|
|
78
78
|
"fs-extra": "^11.3.0",
|
|
79
79
|
"ignore": "^7.0.5",
|
|
80
80
|
"image-size": "^1.1.1",
|