Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 14.02 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.      * Thanks To : Janu Yoga & Aan Ahmad
  5.      * Date Share : 27-03-2019 (First Share)
  6.      * Date Updated V.8 : 07-November-2019
  7.      * Created By : Will Pratama - facebook.com/yaelahhwil
  8. **/
  9.  
  10. date_default_timezone_set("Asia/Jakarta");
  11. class Marlboro extends modules
  12. {
  13.     public $fileCookies = "cookiesMarlboro.txt";
  14.     protected $cookie;
  15.     protected $modules;
  16.  
  17.     private function cookiesAkun()
  18.     {
  19.         $file = $this->fileCookies;
  20.         foreach(explode("\n", str_replace("\r", "", file_get_contents($file))) as $a => $data)
  21.         {
  22.             $pecah = explode("|", trim($data));
  23.             return array("decide_session" => trim($pecah[0]), "email" => trim($pecah[1]), "password" => trim($pecah[2]));
  24.         }
  25.     }
  26.  
  27.     public function generateData($cookies = false)
  28.     {
  29.         $url = 'https://www.marlboro.id/auth/login';
  30.         if($cookies == "true")
  31.         {
  32.             $headers = explode("\n", "Host: www.marlboro.id\nSec-Fetch-Mode: navigate\nSec-Fetch-User: ?1\nSec-Fetch-Site: same-origin\nCookie: decide_session=".trim($this->cookiesAkun()['decide_session']));
  33.         }else{
  34.             $headers = explode("\n", "Host: www.marlboro.id\nSec-Fetch-Mode: navigate\nSec-Fetch-User: ?1\nSec-Fetch-Site: same-origin");
  35.         }
  36.  
  37.         $generateData = $this->request($url, null, $headers, 'GET');
  38.         $decide_session = $this->fetchCookies($generateData[1])['decide_session'];
  39.         $decide_csrf = $this->getStr($generateData[0], '<input type="hidden" name="decide_csrf" value="', '"', 1, 0);
  40.         @$device_id = $this->fetchCookies($generateData[1])['deviceId'];
  41.         return array(
  42.             trim($decide_session),
  43.             trim($decide_csrf),
  44.             trim($device_id),
  45.         );
  46.     }
  47.  
  48.     public function login($email, $password)
  49.     {
  50.         if(@file_exists($this->fileCookies) == true)
  51.         {
  52.             @unlink($this->fileCookies);
  53.         }
  54.  
  55.         $generateData = $this->generateData();
  56.         sleep(1);
  57.  
  58.         $url = "https://www.marlboro.id/auth/login";
  59.         $headers = explode("\n","Host: www.marlboro.id\nX-Requested-With: XMLHttpRequest\nSec-Fetch-Mode: cors\nContent-Type: application/x-www-form-urlencoded; charset=UTF-8\nSec-Fetch-Site: same-origin\nCookie: _p1K4r_=true; pikar_redirect=true; deviceId=".$generateData[2]."; decide_session=".$generateData[0]);
  60.         $post = 'email='.trim(urlencode($email)).'&password='.trim(urlencode($password)).'&ref_uri=/&decide_csrf='.$generateData[1].'&param=&exception_redirect=false';
  61.         $login = $this->request($url, $post, $headers);
  62.         if(strpos($login[0], '"message":"success"'))
  63.         {
  64.             $decide_session = $this->fetchCookies($login[1])['decide_session'];
  65.             //$device_id = $this->fetchCookies($login[1])['deviceId'];
  66.             $this->fwrite($this->fileCookies, trim($decide_session)."|".trim($email)."|".trim($password));
  67.         }
  68.  
  69.         return $login;
  70.     }
  71.  
  72.     private function idVidio()
  73.     {
  74.         $generateData = $this->generateData("true");
  75.  
  76.         $url = 'https://www.marlboro.id/article/explore?q=discovered';
  77.         $headers = explode("\n", "Content-Type: application/x-www-form-urlencoded; charset=UTF-8\nCookie: deviceId=".$generateData[2]."; decide_session=".$generateData[0]);
  78.         $listIdVidio = $this->request($url, null, $headers, 'GET');
  79.  
  80.         return $listIdVidio[0];
  81.     }
  82.  
  83.     public function view($idVidio)
  84.     {
  85.         $generateData = $this->generateData("true");
  86.  
  87.         $url = "https://www.marlboro.id/article/video-play/".$idVidio;
  88.         $headers = explode("\n", "Host: www.marlboro.id\nUpgrade-Insecure-Requests: 1\nSec-Fetch-Mode: navigate\nSec-Fetch-User: ?1\nSec-Fetch-Site: cross-site\nCookie: deviceId=".$generateData[2]."; decide_session=".$generateData[0]);
  89.         $post = 'decide_csrf='.$generateData[1].'&log_id=false&duration=0.012&total_duration=0&fetch=1&g-recaptcha-response=';
  90.        
  91.         $view = $this->request($url, $post, $headers);
  92.         return $view;
  93.     }
  94.  
  95.     protected function update($idVidio, $log_id)
  96.     {
  97.         $generateData = $this->generateData("true");
  98.  
  99.         $url = "https://www.marlboro.id/article/video-play/".$idVidio;
  100.         $headers = explode("\n", "Host: www.marlboro.id\nUpgrade-Insecure-Requests: 1\nSec-Fetch-Mode: navigate\nSec-Fetch-User: ?1\nSec-Fetch-Site: cross-site\nCookie: deviceId=".$generateData[2]."; decide_session=".$generateData[0]);
  101.         $post = 'decide_csrf='.$generateData[1].'&log_id='.$log_id.'&duration=11.052&total_duration=5&fetch=2&g-recaptcha-response';
  102.        
  103.         $update = $this->request($url, $post, $headers);
  104.         return $update[0];
  105.     }
  106.  
  107.     public function getPoint()
  108.     {
  109.         $generateData = $this->generateData("true");
  110.  
  111.         $url = "https://www.marlboro.id/profile";
  112.         $headers = explode("\n", "Host: www.marlboro.id\nUpgrade-Insecure-Requests: 1\nSec-Fetch-Mode: navigate\nSec-Fetch-User: ?1\nSec-Fetch-Site: cross-site\nCookie:deviceId=".$generateData[2]."; decide_session=".$generateData[0]);
  113.         $get = $this->request($url, null, $headers, 'GET');
  114.         $points = $this->getStr($get[0], '/><div class="point">', '</div>', 1, 0);
  115.         return trim($points);
  116.     }
  117.  
  118.     public function execute_login($email, $password)
  119.     {
  120.         for($o=1;$o<=10;$o++)
  121.         {
  122.             sleep(1);
  123.             @$pointAwal = $this->getPoint();
  124.             $login = $this->login($email, $password);
  125.             if(strpos($login[0], '"code":200,"message":"success"'))
  126.             {
  127.                 if(@$this->getPoint() == $pointAwal)
  128.                 {
  129.                     print PHP_EOL."Success Login!, Limit Get Point Login... Done : ".$this->getPoint()." Pts";
  130.                     return false;
  131.                 }else{
  132.                     print PHP_EOL."Success Login!, Point Anda : ".$this->getPoint()." Pts";
  133.                 }
  134.             }elseif(strpos($login[0], '"message":"Please Accept GoAheadPeople T&C"')){
  135.                 if(@file_exists($this->fileCookies) == true)
  136.                 {
  137.                     @unlink($this->fileCookies);
  138.                 }
  139.  
  140.                 print PHP_EOL."Failed Login!, Message : Please Accept GoAheadPeople T&C.. Retry!";
  141.             }elseif(strpos($login[0], '"message":"Email atau password yang lo masukan salah."')){
  142.                 if(@file_exists($this->fileCookies) == true)
  143.                 {
  144.                     @unlink($this->fileCookies);
  145.                 }
  146.  
  147.                 print PHP_EOL."Email atau password yang lo masukan salah.";
  148.                 return false;
  149.             }elseif(strpos($login[0], '"message":"Action is not allowed"')){
  150.                 if(@file_exists($this->fileCookies) == true)
  151.                 {
  152.                     @unlink($this->fileCookies);
  153.                 }
  154.  
  155.                 print PHP_EOL."Action is not allowed\n".$login[0];
  156.                 return false;
  157.             }elseif(strpos($login[0], 'Akun lo telah dikunci')){
  158.                 print PHP_EOL."[RESET PASSWORD] Akun lo telah dikunci karena gagal login berturut-turut.";
  159.                 return false;
  160.             }elseif(strpos($login[0], 'Akun Anda kami blokir')){
  161.                 if(@file_exists($this->fileCookies) == true)
  162.                 {
  163.                     @unlink($this->fileCookies);
  164.                 }
  165.  
  166.                 print "\nAkun Lo kena Banned Sob";
  167.                 return false;          
  168.             }else{
  169.                 if(@file_exists($this->fileCookies) == true)
  170.                 {
  171.                     @unlink($this->fileCookies);
  172.                 }
  173.                 print PHP_EOL."Failed Login\n".$login[0];
  174.                 return false;
  175.             }
  176.         }
  177.     }
  178.  
  179.     public function execute_nonton($email)
  180.     {
  181.         if(@file_exists($this->fileCookies) == false){
  182.             return false;
  183.         }  
  184.  
  185.         for($b = 1; $b <= 7; $b++)
  186.         {  
  187.             sleep(1);
  188.             @$pointAwal = $this->getPoint();
  189.             $idVidio = $this->getStr($this->idVidio(), 'data-ref="https://www.marlboro.id/discovered/article/', '">', $b, 0);
  190.             if(!empty($idVidio))
  191.             {
  192.                 $view = $this->view($idVidio);
  193.                 $log_id = $this->getStr($view[0], '"log_id":"', '"', 1, 0);
  194.                 if(strpos($view[0], '"message":"Success to store log play video."'))
  195.                 {
  196.                     sleep(1);
  197.                     $update = $this->update($idVidio, $log_id);
  198.                     if(strpos($update, '"finished":true'))
  199.                     {
  200.                         if(@$this->getPoint() == @$pointAwal)
  201.                         {
  202.                             print PHP_EOL."Limit Get Point Nonton!,  Done : ".$email." | ".$this->getPoint()." Pts";
  203.                                 return false;  
  204.                         }else{ 
  205.                             print PHP_EOL."Success Menonton!, Point anda : ".$this->getPoint()." Pts";
  206.                         }  
  207.                     }else{
  208.                         print PHP_EOL."Failed!, Point Anda : ".$this->getPoint().PHP_EOL.$update;
  209.                     }
  210.                 }elseif(strpos($view[0], '"message":"Action is not allowed"')){
  211.                     print PHP_EOL."Failed Menonton Vidio!, Message : Action is not allowed..";
  212.                     return false;
  213.                 }else{
  214.                     print PHP_EOL."Gagal Menonton ".$view[0];
  215.                 }  
  216.             }else{
  217.                 print PHP_EOL."ID Vidio Tidak Ditemukan..";
  218.                 return false;
  219.             }
  220.         }  
  221.     }
  222.  
  223.     public function bonusPoints()
  224.     {
  225.         if(@file_exists($this->fileCookies) == false){
  226.             return false;
  227.         }
  228.  
  229.         $generateData = $this->generateData("true");
  230.         @$pointAwal = $this->getPoint();
  231.         $url = 'https://www.marlboro.id/auth/update-profile';
  232.         $headers = explode("\n","Host: www.marlboro.id\nContent-Type: application/x-www-form-urlencoded; charset=UTF-8\nX-Requested-With: XMLHttpRequest\nCookie: deviceId=".$generateData[2]."; decide_session=".$generateData[0].";");
  233.         $post = 'decide_csrf='.$generateData[1].'&email=&password=&phone_number=0&city=99&address=HACKED+BY+FB,COM/YAELAHHWIL&old_password_chg=&new_password_chg=&confirm_password_chg=&security_question=500001002&security_answer=anjinsg&fav_brand1=500019562&fav_brand2=500019457&interest_raw=Visual&province=6&postalcode=0&interest=Visual&stop_subscribe_email_promo=false';
  234.         $bonusPoints = $this->request($url, $post, $headers);
  235.         if(strpos($bonusPoints[0], '"message":"Update profile Success"'))
  236.         {
  237.             if($pointAwal == $this->getPoint())
  238.             {
  239.                 print PHP_EOL."Gagal Mendapatkan Bonus Point.. ".$this->getPoint()." Pts";
  240.             }else{
  241.                 print PHP_EOL."Sukses Mendapatkan Bonus Point.. ".$this->getPoint()." Pts";
  242.             }
  243.         }else{
  244.             print PHP_EOL."Gagals Mendapatkan Bonus Point.. ".$this->getPoint()." Pts";
  245.         }  
  246.     }
  247.  
  248.     public function Passion()
  249.     {
  250.         if(@file_exists($this->fileCookies) == false){
  251.             return false;
  252.         }
  253.  
  254.         $generateData = $this->generateData("true");
  255.         @$pointAwal = $this->getPoint();
  256.         $url = 'https://www.marlboro.id/discovered/passion-quiz-insert';
  257.         $headers = explode("\n","Host: www.marlboro.id\nX-Requested-With: XMLHttpRequest\nContent-Type: application/x-www-form-urlencoded; charset=UTF-8\nCookie: deviceId=".$generateData[2]."; decide_session=".$generateData[0]);
  258.         $post = 'answer=3&decide_csrf='.$generateData[1];
  259.         $this->request($url, $post, $headers); $this->request($url, $post, $headers);
  260.         if($pointAwal == $this->getPoint())
  261.         {
  262.             print PHP_EOL."Limit Get Point Passion.. ".$this->getPoint()." Pts";
  263.         }else{
  264.             print PHP_EOL."Sukses Get Point Passion.. ".$this->getPoint()." Pts";
  265.         }
  266.     }
  267. }
  268.  
  269. class modules
  270. {
  271.     public function request($url, $param, $headers, $request = 'POST')
  272.     {
  273.         $ch = curl_init();
  274.         $data = array(
  275.                 CURLOPT_URL             => $url,
  276.                 CURLOPT_POSTFIELDS      => $param,
  277.                 CURLOPT_HTTPHEADER      => $headers,
  278.                 CURLOPT_CUSTOMREQUEST   => $request,
  279.                 CURLOPT_HEADER          => true,
  280.                 CURLOPT_RETURNTRANSFER  => true,
  281.                 CURLOPT_FOLLOWLOCATION  => true,
  282.                 CURLOPT_SSL_VERIFYPEER  => false
  283.             );
  284.         curl_setopt_array($ch, $data);
  285.         $execute = curl_exec($ch);
  286.         $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
  287.         $header = substr($execute, 0, $header_size);
  288.         $body = substr($execute, $header_size);
  289.         curl_close($ch);
  290.         return [$body, $header];
  291.     }
  292.  
  293.     public function getStr($page, $str1, $str2, $line_str2, $line)
  294.     {
  295.         $get = explode($str1, $page);
  296.         $get2 = explode($str2, $get[$line_str2]);
  297.         return $get2[$line];
  298.     }
  299.  
  300.     public function fetchCookies($source)
  301.     {
  302.         preg_match_all('/^Set-Cookie:\s*([^;]*)/mi', $source, $matches);
  303.         $cookies = array();
  304.         foreach($matches[1] as $item)
  305.         {
  306.             parse_str($item, $cookie);
  307.             $cookies = array_merge($cookies, $cookie);
  308.         }
  309.  
  310.         return $cookies;
  311.     }
  312.  
  313.     public function fwrite($namafile, $data)
  314.     {
  315.         $fh = fopen($namafile, "a");
  316.         fwrite($fh, $data);
  317.         fclose($fh);  
  318.     }
  319. }
  320.  
  321.  
  322. $modules = new modules();
  323. $marlboro = new marlboro();
  324.  
  325. print "\n[!] Script Created By: Will Pratama";
  326. print "\n[!] Note: Jangan Run Lebih Dari 1 Terminal, Kecuali File Beda Folder!";
  327. print "\n[!] Note: Diusahakan menggunakan IP Indonesia";
  328. print "\n[!] @Version: V.8\n\n";
  329.  
  330. print "\nMENU : \n";
  331. print "\n1. Ngebot";
  332. print "\n2. Check Points";
  333. print "\n3. Auto Redeem Auto Alarm Auto Dapet Dll";
  334. print "\n\nPilih Nomor Menu : ";
  335. $menuk = trim(fgets(STDIN));
  336. if($menuk == "1")
  337. {
  338.     awal:
  339.     print "Bonus 250 Points? (Khusus Akun Baru) y/n : ";
  340.     $bonus = trim(fgets(STDIN));
  341.     echo "Input FIle Akun Marlboro (Email|Pass) : ";
  342.     @$fileakun = trim(fgets(STDIN));
  343.  
  344.     if(empty(@file_get_contents($fileakun)))
  345.     {
  346.         print PHP_EOL."File Akun Tidak Ditemukan.. Silahkan Input Ulang".PHP_EOL;
  347.         goto awal;
  348.     }
  349.  
  350.     print PHP_EOL."Total Ada : ".count(explode("\n", str_replace("\r","",@file_get_contents($fileakun))))." Akun, Letsgo..";
  351.  
  352.     while(true)
  353.     {
  354.         echo PHP_EOL."Start Date : ".date("Y-m-d H:i:s");
  355.         foreach(explode("\n", str_replace("\r", "", @file_get_contents($fileakun))) as $c => $akon)
  356.         {  
  357.             $pecah = explode("|", trim($akon));
  358.             $email = trim($pecah[0]);
  359.             $password = trim($pecah[1]);
  360.             echo PHP_EOL.PHP_EOL.PHP_EOL."[".$c."] Ekse Akun : ".$email.PHP_EOL;
  361.  
  362.             print $marlboro->execute_login($email, $password);
  363.             if(@$bonus == "y" or @$bonus == "Y")
  364.             {
  365.                 print $marlboro->bonusPoints();
  366.             }
  367.             print $marlboro->Passion();
  368.             print $marlboro->execute_nonton($email);
  369.         }
  370.        
  371.         echo PHP_EOL.PHP_EOL."Sleep Time : ".date("Y-m-d H:i:s");
  372.         print PHP_EOL."All Done Run!, Sleep 24 Hours";
  373.         print PHP_EOL."Start Besok : ".date('Y-m-d H:i:s', time() + (60 * 60 * 24));
  374.         sleep(86400);
  375.     }
  376. }elseif($menuk == "2"){
  377.     echo "Input FIle Akun Marlboro (Email|Pass) : ";
  378.     @$fileakun = trim(fgets(STDIN));
  379.  
  380.     print PHP_EOL."Total Ada : ".count(explode("\n", str_replace("\r","",@file_get_contents($fileakun))))." Akun, Letsgo..\n";
  381.  
  382.     foreach(explode("\n", str_replace("\r", "", @file_get_contents($fileakun))) as $c => $akon)
  383.     {  
  384.         $pecah = explode("|", trim($akon));
  385.         $email = trim($pecah[0]);
  386.         $password = trim($pecah[1]);
  387.  
  388.         $login = $marlboro->login($email, $password);
  389.         if(strpos($login[0], '"code":200,"message":"success"'))
  390.         {
  391.             $point = $marlboro->getPoint();
  392.             print "\n[".$c."] ".$email."|".$password." - ".$point." Pts";
  393.             fwrite(fopen("marlboroCheckPoint.txt", "a"), $email."|".$password." - ".$point." Pts\n");
  394.         }elseif(strpos($login[0], 'Akun Anda kami blokir')){
  395.             print "\n[".$c."] ".$email."|".$password." - Akun Lo kena Banned Sob";  
  396.         }else{
  397.             print "\n[".$c."] ".$email."|".$password." - Failed Login";
  398.             print "\n".$login[0];
  399.         }
  400.     }
  401. }elseif($menuk == "3"){
  402.     print "\nEnak Aja Ajg >:(";
  403.     exit;
  404. }else{
  405.     print "\nNgentot";
  406.     exit;
  407. }
  408. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement