-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
40 lines (33 loc) · 909 Bytes
/
index.js
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
33
34
35
36
37
38
39
40
const fs = require('fs');
const { Signale } = require('signale');
const { PromisePool } = require('@supercharge/promise-pool');
const {check} = require('./checker');
const Config = require('./config.json');
const Debug = new Signale({
scope: Config.name,
config: {
displayTimestamp: true
}
})
fs.readFile('./lista.txt', {
encoding: 'utf-8'
}, async (error, data) => {
if (error) {
return Debug.error(error);
}
let mask = /\d{11}\|\d{6}/
let list = data.split('\n').filter(e => mask.test(e)).map(e => {
let [cpf, senha] = mask.exec(e)[0].split('|');
return {
cpf,
senha
}
});
await PromisePool
.withConcurrency(Config.bots)
.for(list)
.handleError((error, bot) => {
Debug.error(`Erro ao executar o bot `, bot, error.message);
})
.process(check)
})