Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
613
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.40 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. reg_ulang:
  4. //ce17f56e-a302-4754-9927-ea24d7a0b655
  5. $url = 'https://api.gojekapi.com:443';
  6. function randomColors() {
  7. // the array
  8. $arrX = array(
  9. "0;34","1;34","0;32","1;32","0;36","1;36","0;31","1;31","0;35","1;35","0;33","1;33"
  10. );
  11.  
  12. // get random index from array $arrX
  13. $randIndex = array_rand($arrX);
  14.  
  15. return $arrX[$randIndex];
  16.  
  17. // output the value for the random index
  18. // echo $arrX[$randIndex];
  19. }
  20.  
  21. function curlget($url, $fields = null, $headers = null)
  22. {
  23. $ch = curl_init();
  24. curl_setopt($ch, CURLOPT_URL, $url);
  25. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  26. if ($fields !== null) {
  27. curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
  28. }
  29. curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  30. $result = curl_exec($ch);
  31. curl_close($ch);
  32. return $result;
  33. }
  34.  
  35. function curl($url, $fields = null, $headers = null)
  36. {
  37. $ch = curl_init();
  38. curl_setopt($ch, CURLOPT_URL, $url);
  39. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  40. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  41. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  42. if ($fields !== null) {
  43. curl_setopt($ch, CURLOPT_POST, 1);
  44. curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
  45. }
  46. if ($headers !== null) {
  47. curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  48. }
  49. $result = curl_exec($ch);
  50. $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
  51. curl_close($ch);
  52.  
  53. return array(
  54. $result,
  55. $httpcode
  56. );
  57. }
  58.  
  59.  
  60. $url = 'https://api.gojekapi.com:443';
  61. $headers_reg = array();
  62. $headers_reg[] = 'X-AppVersion: 3.37.2';
  63. $headers_reg[] = 'X-AppId: com.gojek.app';
  64. $headers_reg[] = 'Accept: application/json';
  65. $headers_reg[] = 'X-UniqueId: 60d43b0'.rand(111111111,999999999).'';
  66. $headers_reg[] = 'X-Location: -7.4240784,111.0174752';
  67. $headers_reg[] = 'Content-Type: application/json; charset=UTF-8';
  68. $headers_reg[] = 'Host: api.gojekapi.com';
  69.  
  70. echo "AUTO REGISTER GOJEK + AUTO FIND VOUCHER by Banner + Redeem | Code by Sandro.putraa\n\n";
  71. echo "Nomor HP ? 1/62 ? ";
  72. $nohp = trim(fgets(STDIN));
  73. $reg = curl($url.'/v5/customers', '{"email":"sandromber'.rand(1111,9999).'@gmail.com","name":"sandroawokowmber'.rand(111,999).'","phone":"+'.$nohp.'","signed_up_country":"ID"}', $headers_reg);
  74. $regs = json_decode($reg[0]);
  75. if ($regs->success == "true"){
  76. echo "[ INFO ] " .$regs->data->message."\n";
  77. } else{
  78. echo "Nomor Kedaftar GBLK !\n\n\n\n";
  79. goto reg_ulang;
  80.  
  81. }
  82. otp_ulang:
  83. echo "OTP ? ";
  84. $otp = trim(fgets(STDIN));
  85. $otp = curl($url.'/v5/customers/phone/verify', '{"client_name":"gojek:cons:android","client_secret":"83415d06-ec4e-11e6-a41b-6c40088ab51e","data":{"otp":"'.$otp.'","otp_token":"'.$regs->data->otp_token.'"}}', $headers_reg);
  86. $otps = json_decode($otp[0]);
  87. if ($regs->success == "true"){
  88. echo "[ INFO ] SELAMAT DATANG " .$otps->data->customer->name."\n";
  89. echo "[ INFO ] Token Mu " .$otps->data->access_token."\n";
  90. $token = $otps->data->access_token;
  91. sleep(30);
  92. $headers = array();
  93. $headers[] = 'X-UserTimezone: +07:00';
  94. $headers[] = 'X-Location: -7.4228367,111.020'.rand(11,99).'17';
  95. $headers[] = 'X-Location-Accuracy: 0.0';
  96. $headers[] = 'X-Invalidate-Cache: false';
  97. $headers[] = 'X-Platform: Android';
  98. $headers[] = 'X-UniqueId: 60d43b0'.rand(111111111,999999999).'';
  99. $headers[] = 'Accept: application/json';
  100. $headers[] = 'Content-Type: application/json';
  101. $headers[] = 'X-AppVersion: 3.37.2';
  102. $headers[] = 'X-AppId: com.gojek.app';
  103. $headers[] = 'X-Session-ID: ae'.rand(11,99).'b3f3-0da2-4b39-9b27-4'.rand(111,999).'c44cf870';
  104. $headers[] = 'D1: D8:84:48:D6:31:38:BF:3D:D1:87:C4:0A:88:EB:42:61:72:35:F8:B5:D9:DD:A5:40:1A:37:DB:26:1C:E1:3F:24';
  105. $headers[] = 'X-PhoneModel: google,google Pixel 2';
  106. $headers[] = 'X-PushTokenType: FCM';
  107. $headers[] = 'X-DeviceOS: Android,5.1.1';
  108. $headers[] = 'User-uuid: 658943714';
  109. $headers[] = 'X-DeviceToken: frfhga'.rand(11,99).'F8Q:APA91bGlyz_O28UGL1ofLF4Zr-QEpyTK'.rand(111,999).'Vt9RkXyuZ-lOzQk_uBVlkgqzhTBvtrfvC24MsYkPl5U9F19ePryUw8FjTPxS4HPSNqsq7IVj7t9-iUQGluQOGncPDQJpAHYgwD3wYnpPj';
  110. $headers[] = 'Authorization: Bearer '.$token.'';
  111. $headers[] = 'Accept-Language: en-ID';
  112. $headers[] = 'X-User-Locale: en_ID';
  113. $headers[] = 'X-M1: 1:__10e9b51b14214cad9b15c7bae436c95a,2:b049327681160d43,3:1566311931027-4584574173163478338,4:62867,5:msm8084|2000|2,6:08:00:27:E5:59:0C,7:x8660d43b'.rand(1111111111,9999999999).',8:900x1600,9:passive\,gps\,network,10:1,11:UNKNOWN';
  114. $headers[] = 'Host: api.gojekapi.com';
  115. $headers[] = 'Connection: Keep-Alive';
  116. $headers[] = 'User-Agent: okhttp/3.12.1';
  117. $headers[] = 'If-Modified-Since: Thu, 14 Nov 2019 13:52:09 GMT';
  118. echo "Sabar lur lagi goleki voucher gopud mu :D \n\n";
  119. ulangcek:
  120. for ($i=0; $i <= 10; $i++)
  121. {
  122. $ceklistvoc = curlget($url.'/v2/customer/cards/food', null, $headers);
  123. $voclist = json_decode($ceklistvoc);
  124. $cek = $voclist->data->cards[$i]->content->actions[0]->deep_link;
  125. if(preg_match('/code=(.*)/', $cek, $matches)){
  126. echo "Menemukan Voucher : ".$matches[1]."\n";
  127. echo "Meredeem ".$matches[1]."\n";
  128. sleep(5);
  129. $pocers = curl($url.'/go-promotions/v1/promotions/enrollments', '{
  130. "promo_code":"'.$matches[1].'"
  131. }', $headers);
  132. $pocerss = json_decode($pocers[0]);
  133. if($pocerss->success == false){
  134. echo "\033[1;31m".$pocerss->errors[0]->message."\033\n";
  135. }
  136. if($pocerss->success == true){
  137. echo "\033[1;32m".$pocerss->data->message."\033\n";
  138. $ceklistvoc= curlget($url.'/gopoints/v3/wallet/vouchers?limit=1000&page=1', null, $headers);
  139. $voclist = json_decode($ceklistvoc);
  140. $voclistx = $voclist->voucher_stats->total_vouchers;
  141. echo "mTotal_vouchers : ".$voclistx." Voucher\n";
  142. for ($i=0; $i <= $voclistx; $i++)
  143. {
  144. echo "\033[".randomColors()."m[".$i."/".$voclistx."] ".$voclist->data[$i]->sponsor_name." | ".$voclist->data[$i]->title." | Expiry Date : ".$voclist->data[$i]->expiry_date."\033[0m\033[".randomColors()."m| Voucher_batch_id : ".$voclist->data[$i]->voucher_batch_id."\033[0m\n";
  145. sleep(1);
  146. }
  147. $data = $token. PHP_EOL;
  148. $fp = fopen('GOJEK_TOKEN.txt', 'a');
  149. fwrite($fp, $data);
  150. fclose($fp);
  151. die("");
  152. }
  153. }else{
  154. echo "Voucher tidak tersedia\n";
  155. }
  156. sleep(1);
  157. }
  158. goto ulangcek;
  159. } else{
  160. echo "OTP Salah Njirr !\n\n\n\n";
  161. goto otp_ulang;
  162. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement