Advertisement
Guest User

Tembak

a guest
Sep 25th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 7.54 KB | None | 0 0
  1. <?php
  2. /**
  3. * Name:    Dor Three beta
  4. * Author:  Satria Wibawa
  5. * FB: https://www.facebook.com/HTTP200K
  6. * Github: https://github.com/satriawibawa
  7. * Created: 31/08/2018
  8. *
  9. */
  10. function mintaOTP($nomor, $wait){
  11.    $ch = curl_init();
  12.    $imei = "867706023561122";
  13.    $payload = [
  14.             "msisdn" => "".$nomor."",
  15.             "imei" => $imei
  16.         ];
  17.         $data1 = json_encode($payload, true);
  18.         curl_setopt($ch, CURLOPT_URL,"https://bimaplus.tri.co.id/api/v1/login/otp-request");
  19.         curl_setopt($ch, CURLOPT_POST, 1);
  20.         curl_setopt($ch, CURLOPT_POSTFIELDS, $data1);
  21.         curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  22.         curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  23.             'Content-Type: application/json',
  24.             'Cache-Control: no-store, must-revalidate, no-cache',
  25.             'Pragma: no-cache',
  26.             'Accept: application/json',
  27.             'Accept-Encoding: identity',
  28.             'User-Agent: Dalvik/2.1.0 (Linux; U; Android 5.1.1; A37f Build/LMY47V)',
  29.             'Host: bimaplus.tri.co.id',
  30.             'Connection: Keep-Alive'
  31.         ));
  32.         curl_setopt ($ch, CURLOPT_ENCODING, 'gzip,deflate');
  33.         $server_output = curl_exec ($ch);
  34.         curl_close ($ch);
  35.         sleep($wait);
  36.         flush();
  37.         return $server_output;
  38. };
  39. function RequestLogin($nomor, $otp, $wait){
  40.     $ch = curl_init();
  41.     $imei = "867706023561122";
  42.     $payload = [
  43.             "msisdn" => "".$nomor."",
  44.             "otp" => "".$otp."",
  45.             "imei" => $imei,
  46.             "deviceModel" => "A37f",
  47.             "deviceOs" => "5.1.1",
  48.             "deviceManufactur" => "OPPO"
  49.         ];
  50.         $data1 = json_encode($payload, true);
  51.         curl_setopt($ch, CURLOPT_URL,"https://bimaplus.tri.co.id/api/v1/login/login-with-otp");
  52.         curl_setopt($ch, CURLOPT_POST, 1);
  53.         curl_setopt($ch, CURLOPT_POSTFIELDS, $data1);
  54.         curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  55.         curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  56.             'Content-Type: application/json',
  57.             'Cache-Control: no-store, must-revalidate, no-cache',
  58.             'Pragma: no-cache',
  59.             'Accept: application/json',
  60.             'Accept-Encoding: identity',
  61.             'User-Agent: Dalvik/2.1.0 (Linux; U; Android 5.1.1; A37f Build/LMY47V)',
  62.             'Host: bimaplus.tri.co.id',
  63.             'Connection: Keep-Alive',
  64.         ));
  65.         curl_setopt ($ch, CURLOPT_ENCODING, 'gzip,deflate');
  66.         $server_output = curl_exec ($ch);
  67.         curl_close ($ch);
  68.         sleep($wait);
  69.         flush();
  70.         return $server_output;
  71.     };
  72. function BeliLangsung($no, $wait, $id){
  73.     $ch = curl_init();
  74.     $waktu = date('Ymdims');
  75.     $payload = [
  76.           "callPlan" => "SP KEWL",
  77.           "imei" => "864217034503297",
  78.           "language" => "0",
  79.           "msisdn" => "".$no."",
  80.           "paymentMethod" => "00",
  81.           "menuCategoryName" => "rfu",
  82.           "menuSubCategoryName" => "rfu",
  83.           "productId" => "".$id."",
  84.           "secretKey" => "".$_SESSION['secretKey']."",
  85.           "servicePlan" => "-",
  86.           "subscriberType" => "Prepaid",
  87.           "vendorId" => "11"
  88.         ];
  89.         $data1 = json_encode($payload, true);
  90.         curl_setopt($ch, CURLOPT_URL,"https://bimaplus.tri.co.id/api/v1/recommended/redeem");
  91.         curl_setopt($ch, CURLOPT_POST, 1);
  92.         curl_setopt($ch, CURLOPT_POSTFIELDS, $data1);
  93.         curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  94.         curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  95.             'Content-Type: application/json',
  96.             'Cache-Control: no-store, must-revalidate, no-cache',
  97.             'Pragma: no-cache',
  98.             'Accept: application/json',
  99.             'Accept-Encoding: identity',
  100.             'User-Agent: Dalvik/2.1.0 (Linux; U; Android 5.1.1; A37f Build/LMY47V)',
  101.             'Host: bimaplus.tri.co.id',
  102.             'Connection: Keep-Alive',
  103.         ));
  104.         curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false);
  105.         curl_setopt ($ch, CURLOPT_ENCODING, 'gzip,deflate');
  106.         $server_output = curl_exec ($ch);
  107.         curl_close ($ch);
  108.         sleep($wait);
  109.         flush();
  110.         return $server_output;
  111.     }
  112.     function service($str) {
  113.     switch ((int) $str) {
  114.         case 1: return 'RFU2753DVIU';
  115.         break;
  116.        
  117.         case 2: return '32GB30Min30D';
  118.         break;
  119.                        
  120.         default;
  121.     }
  122.     }
  123.     $respon = '';
  124.     if (isset($_POST["OTP"])) {
  125.         $nomor = $_POST['nomor'];
  126.         $jeda = "1";
  127.         $execute = mintaOTP($nomor, $jeda);
  128.         $data = json_decode((string) $execute);
  129.         $respon = $data->status;
  130.     }else if (isset($_POST["login"])) {
  131.         $nomor = $_POST['nomor'];
  132.         $otp = $_POST['_otp'];
  133.         $jeda = "1";
  134.         $execute = RequestLogin($nomor, $otp, $jeda);
  135.         $data = json_decode((string) $execute);
  136.         if ($data->status == '1'){
  137.             $respon = 'Login Sukses';
  138.         }
  139.     }else if (isset($_POST["beli"])) {
  140.         $nomor = $_POST['nomor'];
  141.         $jeda = "1";
  142.         $id = service($_POST['anuID']);
  143.         $var = $_POST['anuID'];
  144.         $execute = BeliLangsung($nomor, $jeda, $id);
  145.         $respon = $execute;
  146.     }
  147. }
  148. ?>
  149. <html>
  150. <head>
  151. <meta charset="utf-8">
  152. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  153. <meta name="viewport" content="width=device-width, initial-scale=1">
  154. <title>Three</title>
  155. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
  156. <style type="text/css">
  157.     #wrapshopcart{width:350px;margin:auto;padding:20px;
  158.      padding-bottom: 1px;margin-bottom: 20px;background:#fff;box-shadow:0 0 5px #c1c1c1;border-radius:5px;}
  159.     #response{
  160.         text-align: center;
  161.     }
  162.     #EE{
  163.         width: 50%;
  164.     }
  165.     textarea { resize:none; }
  166.     #count{
  167.         text-align: right;
  168.     }
  169. </style>
  170. </head>
  171. <body>
  172. <br>
  173. <div id="wrapshopcart">
  174.     <h3>Tembak Three</h3>
  175.     <hr/>
  176.     <div class="form-group">
  177.         <?php
  178.        (isset($_POST["anuID"])) ? $anuID = $_POST["anuID"] : $anuID=1;
  179.        ?>
  180.             <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method='post'>
  181.                 <div class="Login" style="display: block;">
  182.                 <label>Nomor Three: </label>
  183.                 <input class="form-control" type="text" name="nomor" value="<?php echo isset($_POST['nomor']) ? $_POST['nomor'] : ''; ?>" placeholder="Contoh: 628xxxx" required><br>
  184.                 <label>OTP Three: </label>
  185.                 <div class="input-group mb-3">
  186.                 <input class="form-control" type="text" name="_otp" value="<?php echo isset($_POST['_otp']) ? $_POST['_otp'] : ''; ?>" placeholder="Contoh: ABC123"><br><div class="input-group-append">
  187.                 <button type="submit" class="btn btn-info" name="OTP">Minta OTP</button></div></div>
  188.                 <div class="form-group">
  189.                 </div>
  190.                 <button type="submit" class="btn btn-success" name="login">Login</button><br><br>
  191.                 <div class="form-group">
  192.                     <label>Pilih paket default</label><br>
  193.                     <select class="form-control" id="anuID" name="anuID">
  194.                         <option <?php if ($anuID == 1 ) echo 'selected' ; ?> value="1">Paket 2.75GB, 3hr, Rp10rb</option>
  195.                         <option <?php if ($anuID == 2 ) echo 'selected' ; ?> value="2">Paket 32GB, 30hr, Rp60rb</option>
  196.                     </select>
  197.                 </div>
  198.                 <button type="submit" class="btn btn-success" name="beli">Beli Paket</button>
  199.                 </div>
  200.             </form>
  201.              <textarea class="form-control input-sm" type="textarea" placeholder="message" maxlength="150" rows="2" style="text-align: center;" readonly><?php echo $respon; ?></textarea>
  202. <center>
  203.     <p> &copy; 2018 By Satria Wibawa</p>
  204. <center>
  205.     </div>
  206. </body>
  207. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement