-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
32 lines (26 loc) · 1.06 KB
/
main.js
File metadata and controls
32 lines (26 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import log from './utils/logger.js';
import cucuSabeni from './utils/banner.js';
import { readFile } from './utils/file.js';
import { AccountManager } from './services/account.js';
import { ProxyManager } from './utils/proxyManager.js';
async function main() {
log.info(cucuSabeni);
const tokens = readFile("tokens.txt");
const proxies = readFile("proxy.txt");
const proxyManager = new ProxyManager(proxies);
try {
log.info(`🚀 Starting program with ${tokens.length} accounts...`);
if (proxies.length > 0) {
log.info(`🌐 Loaded ${proxies.length} proxies`);
}
await Promise.all(tokens.map(async (token, index) => {
const proxy = proxyManager.getRandomProxy();
const account = new AccountManager(token, proxy, index + 1, proxyManager);
await account.initialize();
}));
log.info(`✅ Connection established | 🎮 Program running | ⏰ Waiting for updates...`);
} catch (error) {
log.error(`❌ WebSocket Error: ${error.message}`);
}
}
main();