entrox-bypass 0.2.0 → 0.3.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/README.md +248 -149
- package/dist/index.cjs +407 -61
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +388 -61
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +84 -2
package/README.md
CHANGED
|
@@ -1,215 +1,287 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ⚡ entrox-bypass
|
|
2
2
|
|
|
3
|
-
> AI-
|
|
3
|
+
> AI-Powered Browser Automation & CAPTCHA Bypass Solution
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/entrox-bypass)
|
|
6
|
+
[](https://www.npmjs.com/package/entrox-bypass)
|
|
6
7
|
[](LICENSE)
|
|
8
|
+
[](https://www.typescriptlang.org/)
|
|
9
|
+
[](https://playwright.dev/)
|
|
7
10
|
|
|
8
|
-
Automated login
|
|
11
|
+
Automated login, CAPTCHA solving, and browser automation — enhanced with AI-powered image recognition, proxy rotation, human-like behavior simulation, and webhook notifications.
|
|
9
12
|
|
|
10
|
-
## Features
|
|
13
|
+
## 🚀 Features
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
| Feature | Description |
|
|
16
|
+
|---------|-------------|
|
|
17
|
+
| 🤖 **AI CAPTCHA Solver** | Real-time CAPTCHA recognition using Google Gemma via OpenRouter |
|
|
18
|
+
| 🔐 **Smart Login Flow** | Complete automation: fill, solve, submit with retries |
|
|
19
|
+
| 🛡️ **Bot Detection Evasion** | Human-like delays, randomized timing, anti-detection patterns |
|
|
20
|
+
| 🌐 **Proxy Support** | HTTP/SOCKS proxy with authentication and optional rotation |
|
|
21
|
+
| 🔄 **Auto-Retry** | Exponential backoff retry on failures (configurable attempts) |
|
|
22
|
+
| 💾 **Session Persistence** | Save/restore cookies across sessions |
|
|
23
|
+
| 📹 **Video Recording** | Optional MP4 recording of entire automation flow |
|
|
24
|
+
| 🔔 **Webhook Alerts** | Discord/webhook notifications on success/failure |
|
|
25
|
+
| ☁️ **Cloudinary Integration** | Efficient image upload and CDN delivery |
|
|
26
|
+
| 📦 **Dual Module** | Full ESM + CJS compatibility |
|
|
27
|
+
| ✍️ **TypeScript First** | Comprehensive type definitions included |
|
|
18
28
|
|
|
19
|
-
## Installation
|
|
29
|
+
## 📦 Installation
|
|
20
30
|
|
|
21
31
|
```bash
|
|
22
|
-
|
|
32
|
+
# Install package + Playwright
|
|
33
|
+
npm install entrox-bypass playwright
|
|
23
34
|
npx playwright install chromium
|
|
24
35
|
```
|
|
25
36
|
|
|
26
|
-
## Quick Start
|
|
37
|
+
## 🛠 Quick Start
|
|
27
38
|
|
|
28
|
-
### Environment Variables
|
|
39
|
+
### 1. Configure Environment Variables
|
|
29
40
|
|
|
30
|
-
Create a `.env` file
|
|
41
|
+
Create a `.env` file:
|
|
31
42
|
|
|
32
43
|
```env
|
|
33
|
-
#
|
|
44
|
+
# Authentication
|
|
34
45
|
EMAIL=your_email@example.com
|
|
35
46
|
PASSWORD=your_password
|
|
36
47
|
|
|
37
|
-
#
|
|
48
|
+
# AI Model (OpenRouter)
|
|
38
49
|
OPENROUTER_API_KEY=sk-or-v1-your-api-key
|
|
39
50
|
|
|
40
|
-
#
|
|
51
|
+
# Image Upload (Cloudinary)
|
|
41
52
|
CLOUDINARY_CLOUD_NAME=your_cloud_name
|
|
42
53
|
CLOUDINARY_API_KEY=your_api_key
|
|
43
54
|
CLOUDINARY_API_SECRET=your_api_secret
|
|
44
55
|
```
|
|
45
56
|
|
|
46
|
-
###
|
|
57
|
+
### 2. Basic Automated Login
|
|
47
58
|
|
|
48
|
-
```
|
|
49
|
-
import { automateLogin } from '
|
|
59
|
+
```typescript
|
|
60
|
+
import { automateLogin } from 'entrox-bypass';
|
|
50
61
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
headless: false, // Set true for server environments
|
|
55
|
-
outputScreenshotPath: './result.png' // Optional screenshot after login
|
|
56
|
-
});
|
|
62
|
+
const result = await automateLogin({
|
|
63
|
+
url: 'https://example.com/login',
|
|
64
|
+
});
|
|
57
65
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
console.error('Login failed:', result.error);
|
|
64
|
-
}
|
|
65
|
-
})();
|
|
66
|
+
if (result.success) {
|
|
67
|
+
console.log('✅ Logged in:', result.url);
|
|
68
|
+
} else {
|
|
69
|
+
console.error('❌ Failed:', result.error);
|
|
70
|
+
}
|
|
66
71
|
```
|
|
67
72
|
|
|
68
|
-
###
|
|
69
|
-
|
|
70
|
-
```javascript
|
|
71
|
-
import { chromium } from 'playwright';
|
|
72
|
-
import { solveCaptchaFromPage } from 'playwright-captcha';
|
|
73
|
-
|
|
74
|
-
const browser = await chromium.launch();
|
|
75
|
-
const page = await browser.newPage();
|
|
73
|
+
### 3. Advanced Configuration (All Features)
|
|
76
74
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
75
|
+
```typescript
|
|
76
|
+
import { automateLogin } from 'entrox-bypass';
|
|
77
|
+
|
|
78
|
+
const result = await automateLogin({
|
|
79
|
+
url: 'https://secure-site.com/login',
|
|
80
|
+
|
|
81
|
+
// Override credentials
|
|
82
|
+
email: 'user@test.com',
|
|
83
|
+
password: 'secret123',
|
|
84
|
+
|
|
85
|
+
// Anti-detection
|
|
86
|
+
headless: true,
|
|
87
|
+
delayRange: { min: 800, max: 2500 },
|
|
88
|
+
|
|
89
|
+
// Retry on failure
|
|
90
|
+
retryCount: 3,
|
|
91
|
+
baseRetryDelay: 1500,
|
|
92
|
+
|
|
93
|
+
// Proxy support
|
|
94
|
+
proxy: {
|
|
95
|
+
server: 'http://proxy.example.com:8080',
|
|
96
|
+
username: 'proxy-user',
|
|
97
|
+
password: 'proxy-pass',
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
// Session persistence
|
|
101
|
+
cookieFile: './cookies.json',
|
|
102
|
+
|
|
103
|
+
// Video recording
|
|
104
|
+
videoPath: './recording.mp4',
|
|
105
|
+
|
|
106
|
+
// Webhook notifications
|
|
107
|
+
webhookUrl: 'https://discord.com/api/webhooks/xxxxx/yyyyyy',
|
|
108
|
+
|
|
109
|
+
// Output
|
|
110
|
+
outputScreenshotPath: './success.png',
|
|
111
|
+
});
|
|
86
112
|
```
|
|
87
113
|
|
|
88
|
-
## API Reference
|
|
114
|
+
## 📖 API Reference
|
|
89
115
|
|
|
90
116
|
### `automateLogin(options)`
|
|
91
117
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
**Parameters:**
|
|
95
|
-
|
|
96
|
-
| Option | Type | Required | Default | Description |
|
|
97
|
-
|--------|------|----------|---------|-------------|
|
|
98
|
-
| `url` | `string` | ✅ Yes | — | Target login page URL |
|
|
99
|
-
| `loginSelector` | `string` | ❌ No | `#login` | CSS selector for email/login field |
|
|
100
|
-
| `passwordSelector` | `string` | ❌ No | `#password` | CSS selector for password field |
|
|
101
|
-
| `captchaInputSelector` | `string` | ❌ No | `#captcha` | CSS selector for CAPTCHA input field |
|
|
102
|
-
| `submitButtonSelector` | `string` | ❌ No | `button[type='submit']` | CSS selector for submit button |
|
|
103
|
-
| `headless` | `boolean` | ❌ No | `false` | Run browser in headless mode |
|
|
104
|
-
| `outputScreenshotPath` | `string` | ❌ No | — | Path to save post-login screenshot |
|
|
105
|
-
| `screenshotDelay` | `number` | ❌ No | — | Milliseconds to wait before screenshot |
|
|
106
|
-
|
|
107
|
-
**Returns:** `Promise<LoginResult>`
|
|
118
|
+
Full end-to-end automated login with AI CAPTCHA solving.
|
|
108
119
|
|
|
109
120
|
```typescript
|
|
121
|
+
interface LoginOptions {
|
|
122
|
+
// Required
|
|
123
|
+
url: string;
|
|
124
|
+
|
|
125
|
+
// Credentials (override env vars)
|
|
126
|
+
email?: string;
|
|
127
|
+
password?: string;
|
|
128
|
+
|
|
129
|
+
// Selectors
|
|
130
|
+
loginSelector?: string; // default: '#login'
|
|
131
|
+
passwordSelector?: string; // default: '#password'
|
|
132
|
+
captchaInputSelector?: string; // default: '#captcha'
|
|
133
|
+
submitButtonSelector?: string; // default: "button[type='submit']"
|
|
134
|
+
|
|
135
|
+
// Browser config
|
|
136
|
+
headless?: boolean; // default: false
|
|
137
|
+
|
|
138
|
+
// Anti-detection
|
|
139
|
+
delayRange?: {
|
|
140
|
+
min: number; // min delay ms between actions
|
|
141
|
+
max: number; // max delay ms between actions
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
// Retry logic
|
|
145
|
+
retryCount?: number; // default: 2
|
|
146
|
+
baseRetryDelay?: number; // default: 1000 (ms)
|
|
147
|
+
|
|
148
|
+
// Proxy
|
|
149
|
+
proxy?: {
|
|
150
|
+
server: string;
|
|
151
|
+
username?: string;
|
|
152
|
+
password?: string;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
// Session
|
|
156
|
+
cookieFile?: string; // Path to save/restore cookies
|
|
157
|
+
|
|
158
|
+
// Recording
|
|
159
|
+
videoPath?: string; // Path for MP4 recording
|
|
160
|
+
|
|
161
|
+
// Notifications
|
|
162
|
+
webhookUrl?: string; // Discord/webhook URL
|
|
163
|
+
|
|
164
|
+
// Output
|
|
165
|
+
outputScreenshotPath?: string; // Post-login screenshot path
|
|
166
|
+
}
|
|
167
|
+
|
|
110
168
|
interface LoginResult {
|
|
111
169
|
success: boolean;
|
|
112
170
|
url: string;
|
|
113
171
|
title: string;
|
|
114
|
-
page: Page;
|
|
115
|
-
error?: string;
|
|
172
|
+
page: Page; // Playwright Page instance
|
|
173
|
+
error?: string;
|
|
116
174
|
}
|
|
117
175
|
```
|
|
118
176
|
|
|
119
|
-
|
|
177
|
+
**Returns:** `Promise<LoginResult>`
|
|
120
178
|
|
|
121
|
-
|
|
179
|
+
---
|
|
122
180
|
|
|
123
|
-
|
|
181
|
+
### `solveCaptchaFromPage(page, options?)`
|
|
124
182
|
|
|
125
|
-
|
|
183
|
+
Extract text from CAPTCHA images using AI recognition.
|
|
126
184
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
185
|
+
```typescript
|
|
186
|
+
async function solveCaptchaFromPage(
|
|
187
|
+
page: Page,
|
|
188
|
+
captchaSelector?: string, // default: 'img.captcha-image'
|
|
189
|
+
options?: {
|
|
190
|
+
outputScreenshotPath?: string;
|
|
191
|
+
maxRetries?: number; // default: 3
|
|
192
|
+
retryDelayMs?: number; // default: 1000
|
|
193
|
+
timeoutMs?: number; // default: 30000
|
|
194
|
+
}
|
|
195
|
+
): Promise<CaptchaResult>;
|
|
196
|
+
```
|
|
132
197
|
|
|
133
198
|
**Returns:** `Promise<CaptchaResult>`
|
|
134
199
|
|
|
135
200
|
```typescript
|
|
136
201
|
interface CaptchaResult {
|
|
137
|
-
text: string; //
|
|
138
|
-
description: string; //
|
|
202
|
+
text: string; // Extracted text (e.g., 'X7K9P')
|
|
203
|
+
description: string; // Image description
|
|
139
204
|
}
|
|
140
205
|
```
|
|
141
206
|
|
|
142
207
|
---
|
|
143
208
|
|
|
144
|
-
|
|
209
|
+
### Utility Functions
|
|
145
210
|
|
|
146
|
-
|
|
211
|
+
#### `humanDelay`
|
|
212
|
+
Randomized delay utility for bot detection evasion.
|
|
147
213
|
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
LLM_MODEL=google/gemma-4-26b-a4b-it
|
|
151
|
-
```
|
|
214
|
+
```typescript
|
|
215
|
+
import { humanDelay } from 'entrox-bypass';
|
|
152
216
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
- `openai/gpt-4o`
|
|
156
|
-
- `anthropic/claude-3.5-sonnet`
|
|
157
|
-
- See [OpenRouter](https://openrouter.ai/models) for more options
|
|
217
|
+
await humanDelay.randomBetween(500, 1500); // Random delay 0.5-1.5s
|
|
218
|
+
```
|
|
158
219
|
|
|
159
|
-
|
|
220
|
+
#### `retry`
|
|
221
|
+
Exponential backoff retry wrapper.
|
|
160
222
|
|
|
161
|
-
|
|
223
|
+
```typescript
|
|
224
|
+
import { retry } from 'entrox-bypass';
|
|
162
225
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
passwordSelector: '#password-input',
|
|
168
|
-
captchaInputSelector: '#captcha-code',
|
|
169
|
-
submitButtonSelector: '.btn-signin'
|
|
226
|
+
const result = await retry(async () => fetchSomeData(), {
|
|
227
|
+
maxAttempts: 5,
|
|
228
|
+
delayMs: 1000,
|
|
229
|
+
multiplier: 2,
|
|
170
230
|
});
|
|
171
231
|
```
|
|
172
232
|
|
|
173
|
-
##
|
|
233
|
+
## 🌍 Supported LLM Models
|
|
174
234
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
235
|
+
All models via [OpenRouter](https://openrouter.ai):
|
|
236
|
+
|
|
237
|
+
| Model | Recommended For |
|
|
238
|
+
|-------|-----------------|
|
|
239
|
+
| `google/gemma-4-26b-a4b-it` | CAPTCHA text extraction (default) |
|
|
240
|
+
| `openai/gpt-4o` | Complex visual puzzles |
|
|
241
|
+
| `anthropic/claude-3.5-sonnet` | High accuracy tasks |
|
|
242
|
+
| `meta-llama/llama-3.2-11b-vision-instruct` | Balanced speed/accuracy |
|
|
243
|
+
|
|
244
|
+
Change model in `.env`:
|
|
245
|
+
```env
|
|
246
|
+
LLM_MODEL=openai/gpt-4o
|
|
186
247
|
```
|
|
187
248
|
|
|
188
|
-
##
|
|
249
|
+
## 🔒 Security & Best Practices
|
|
189
250
|
|
|
190
|
-
|
|
251
|
+
- ✅ **Never commit `.env`** — Use `.env.example` as template
|
|
252
|
+
- ✅ **Use headless mode** on production servers
|
|
253
|
+
- ✅ **Set appropriate timeouts** to prevent hanging
|
|
254
|
+
- ✅ **Respect terms of service** — Only automate sites you own or have permission to test
|
|
255
|
+
- ✅ **Rotate user agents/proxies** when making many requests
|
|
191
256
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
257
|
+
## 🏗 Architecture
|
|
258
|
+
|
|
259
|
+
```
|
|
260
|
+
┌─────────────┐ ┌──────────────┐ ┌──────────────┐ ┌─────────────┐
|
|
261
|
+
│ Playwright │───▶│ Cloudinary │───▶│ OpenRouter │───▶│ AI Parser │
|
|
262
|
+
│ Browser │ │ (Upload) │ │ (LLM Model) │ │ JSON Out │
|
|
263
|
+
└─────────────┘ └──────────────┘ └──────────────┘ └─────────────┘
|
|
264
|
+
│ │
|
|
265
|
+
▼ ▼
|
|
266
|
+
┌─────────────────┐ ┌──────────────────────┐
|
|
267
|
+
│ Fill Form Fields │◀────────────────────────────│ Extract Text Content │
|
|
268
|
+
│ Submit Actions │ └──────────────────────┘
|
|
269
|
+
│ Cookie Handling │
|
|
270
|
+
│ Webhook Alerts │
|
|
271
|
+
│ Video Recording │
|
|
272
|
+
└─────────────────┘
|
|
204
273
|
```
|
|
205
274
|
|
|
206
|
-
## Development
|
|
275
|
+
## 🧪 Development
|
|
207
276
|
|
|
208
277
|
```bash
|
|
209
|
-
# Clone
|
|
210
|
-
git clone
|
|
211
|
-
cd
|
|
278
|
+
# Clone repository
|
|
279
|
+
git clone https://github.com/dev-sajid007/entrox-bypass.git
|
|
280
|
+
cd entrox-bypass
|
|
281
|
+
|
|
282
|
+
# Install dependencies
|
|
212
283
|
npm install
|
|
284
|
+
npx playwright install chromium
|
|
213
285
|
|
|
214
286
|
# Build bundles (ESM + CJS)
|
|
215
287
|
npm run build
|
|
@@ -217,34 +289,61 @@ npm run build
|
|
|
217
289
|
# Run tests
|
|
218
290
|
npm test
|
|
219
291
|
|
|
220
|
-
#
|
|
292
|
+
# Type checking
|
|
221
293
|
npx tsc --noEmit
|
|
294
|
+
|
|
295
|
+
# Watch mode during development
|
|
296
|
+
npm run dev
|
|
222
297
|
```
|
|
223
298
|
|
|
224
|
-
|
|
299
|
+
### Project Structure
|
|
225
300
|
|
|
226
301
|
```
|
|
227
|
-
|
|
302
|
+
entrox-bypass/
|
|
228
303
|
├── src/
|
|
229
|
-
│ ├── index.ts
|
|
230
|
-
│ ├── login.ts
|
|
231
|
-
│ ├── captchaSolve.ts
|
|
232
|
-
│ ├── cloudinary.ts
|
|
233
|
-
│
|
|
304
|
+
│ ├── index.ts # Public API exports
|
|
305
|
+
│ ├── login.ts # automateLogin implementation
|
|
306
|
+
│ ├── captchaSolve.ts # CAPTCHA extraction pipeline
|
|
307
|
+
│ ├── cloudinary.ts # Cloudinary configuration
|
|
308
|
+
│ ├── llm.ts # OpenRouter LLM integration
|
|
309
|
+
│ └── utils/
|
|
310
|
+
│ ├── humanDelay.ts # Bot-evasion timing utilities
|
|
311
|
+
│ └── retry.ts # Exponential backoff retry logic
|
|
234
312
|
├── types/
|
|
235
|
-
│ └── index.d.ts
|
|
236
|
-
├── dist/
|
|
237
|
-
|
|
313
|
+
│ └── index.d.ts # TypeScript declarations
|
|
314
|
+
├── dist/ # Bundled output (published)
|
|
315
|
+
├── test/ # Jest test suite
|
|
316
|
+
├── .env.example # Environment template
|
|
317
|
+
├── tsup.config.ts # Bundle configuration
|
|
318
|
+
└── package.json
|
|
238
319
|
```
|
|
239
320
|
|
|
240
|
-
##
|
|
321
|
+
## 📊 Changelog
|
|
322
|
+
|
|
323
|
+
| Version | Date | Changes |
|
|
324
|
+
|---------|------|---------|
|
|
325
|
+
| 0.3.0 | 2026-10-25 | Added proxy, retry, webhooks, video recording, session persistence |
|
|
326
|
+
| 0.2.0 | 2026-10-25 | Package rename, enhanced AI model support |
|
|
327
|
+
| 0.1.0 | 2026-10-25 | Initial release |
|
|
328
|
+
|
|
329
|
+
## 📄 License
|
|
330
|
+
|
|
331
|
+
ISC — Feel free to use in personal and commercial projects.
|
|
332
|
+
|
|
333
|
+
## 🤝 Contributing
|
|
334
|
+
|
|
335
|
+
Contributions welcome! Please:
|
|
241
336
|
|
|
242
|
-
|
|
337
|
+
1. Fork the repository
|
|
338
|
+
2. Create a feature branch (`feat/your-feature`)
|
|
339
|
+
3. Write tests for new functionality
|
|
340
|
+
4. Ensure all tests pass (`npm test`)
|
|
341
|
+
5. Submit a pull request
|
|
243
342
|
|
|
244
|
-
##
|
|
343
|
+
## ⚠️ Disclaimer
|
|
245
344
|
|
|
246
|
-
|
|
345
|
+
Always obtain proper authorization before automating interactions with any website. Respect robots.txt, rate limits, and terms of service. This tool is designed for legitimate testing and automation purposes only.
|
|
247
346
|
|
|
248
347
|
---
|
|
249
348
|
|
|
250
|
-
|
|
349
|
+
**Built with ❤️ using Playwright, LangChain, Cloudinary & OpenRouter**
|