Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.14 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * Thanks To : Janu Yoga & Aan Ahmad
  5. * Date Share : 27-03-2019
  6. * Date Updated V.3 : 30-MEI-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. protected $cookie;
  14. protected $modules;
  15.  
  16. public function __construct()
  17. {
  18. $this->modules = new modules();
  19. }
  20.  
  21. private function cookiesAkun()
  22. {
  23. $file = "cookiesAkun.txt";
  24. foreach(explode("\n", str_replace("\r", "", file_get_contents($file))) as $a => $data)
  25. {
  26. return array("cookie" => @explode("|", trim($data))[0], "email" => @explode("|", trim($data))[1], "password" => @explode("|", trim($data))[2], "deviceid" => @explode("|", trim($data))[3]);
  27. }
  28. }
  29.  
  30. private function login($email, $password)
  31. {
  32. if(@file_exists("cookiesAkun.txt") == true){@unlink("cookiesAkun.txt");}if(@file_exists("cookiesMarlboro.txt") == true){@unlink("cookiesMarlboro.txt");}
  33.  
  34. $cook = $this->modules->fetchCookies($this->modules->curl("https://www.marlboro.id", null, false, false, true, array("Host: www.marlboro.id"), 'GET'));
  35. $headers = array();
  36. $headers[] = "Content-Type: application/x-www-form-urlencoded; charset=UTF-8";
  37. $headers[] = "Cookie: decide_session=".$cook['decide_session'];
  38. $headers[] = "Host: www.marlboro.id";
  39. $headers[] = "Origin: https://www.marlboro.id";
  40. $headers[] = "Referer: https://www.marlboro.id/";
  41. $headers[] = "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW".rand(000, 999).") AppleWebKit/".rand(00000, 99999).".36 (KHTML, like Gecko) Chrome/72.0.".rand(00000, 99999).".".rand(00000, 99999)." Safari/".rand(00000, 99999).".36";
  42. $headers[] = "X-Requested-With: XMLHttpRequest";
  43. $csrf = $this->modules->getStr($this->modules->curl("https://www.marlboro.id", null, false, false, false, $headers, 'GET'), 'name="decide_csrf" value="', '"', 1, 0);
  44. $login = $this->modules->curl("https://www.marlboro.id/auth/login", "email=".$email."&password=".$password."&decide_csrf=".$csrf."&ref_uri=/", true, false, true, $headers);
  45. $cookies = $this->modules->fetchCookies($login)['decide_session'];
  46. $deviceid = $this->modules->fetchCookies($login)['deviceId'];
  47. $this->modules->fwrite("cookiesAkun.txt", @$cookies."|".$email."|".$password."|".$deviceid);
  48. return $login;
  49. }
  50.  
  51. private function idVidio()
  52. {
  53. $headers = array();
  54. $headers[] = "Content-Type: application/x-www-form-urlencoded; charset=UTF-8";
  55. $headers[] = "Cookie: deviceId=".$this->cookiesAkun()['deviceid']."; decide_session=".$this->cookiesAkun()['cookie'];
  56. $headers[] = "Host: www.marlboro.id";
  57. $listIdVidio = $this->modules->curl("https://www.marlboro.id", null, false, true, false, $headers, 'GET');
  58. return $listIdVidio;
  59. }
  60.  
  61. protected function view($idVidio)
  62. {
  63. $headers = array();
  64. $headers[] = "Content-Type: application/x-www-form-urlencoded; charset=UTF-8";
  65. $headers[] = "Cookie: deviceId=".$this->cookiesAkun()['deviceid']."; _ga=GA1.2.80096599.1559215776; _gid=GA1.2.79762902.1559215776; ins-mig-done=1; ev=1; _mm3rm4bre_=6B%2FUJWvPEfAWe0iZqDpXOJ1YF8gkcXhrMXVyJC5tajloaHdpamgwem1uYnhrdmlldjQ%3D; accC=true; mp_41fb5b1708a7763a1be4054da0f74d65_mixpanel=%7B%22distinct_id%22%3A%20%2216b0880a02b18f-066b2c15aa7e45-e353165-100200-16b0880a02c862%22%2C%22%24device_id%22%3A%20%2216b0880a02b18f-066b2c15aa7e45-e353165-100200-16b0880a02c862%22%2C%22%24initial_referrer%22%3A%20%22%24direct%22%2C%22%24initial_referring_domain%22%3A%20%22%24direct%22%7D; content_viewc=3; token=JeLy0F7pzJK722MQXeXVcxqbZSdTNxOX; refresh_token=0nvFDJuHhlQ7gb5x21X5GUfzdpnM2vPz; _gat_UA-102334128-3=1; decide_session=".$this->cookiesAkun()['cookie'];
  66. $headers[] = "Host: www.marlboro.id";
  67. $headers[] = "Origin: https://www.marlboro.id";
  68. $headers[] = "Referer: https://www.marlboro.id/";
  69. $headers[] = "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW".rand(000, 999).") AppleWebKit/".rand(00000, 99999).".36 (KHTML, like Gecko) Chrome/72.0.".rand(00000, 99999).".".rand(00000, 99999)." Safari/".rand(00000, 99999).".36";
  70. $headers[] = "X-Requested-With: XMLHttpRequest";
  71. $csrf = $this->modules->getStr($this->modules->curl("https://www.marlboro.id/", null, false, true, false, $headers, 'GET'), 'name="decide_csrf" value="', '"', 1, 0);
  72. $view = $this->modules->curl("https://www.marlboro.id/article/video-play/".$idVidio, "decide_csrf=".$csrf."&log_id=false&duration=0.009&total_duration=0&fetch=1&g-recaptcha-response=", false, false, true, $headers);
  73. return $view;
  74. }
  75.  
  76. protected function update($idVidio, $decide_session, $log_id)
  77. {
  78. $headers = array();
  79. $headers[] = "Content-Type: application/x-www-form-urlencoded; charset=UTF-8";
  80. $headers[] = "Cookie: deviceId=".$this->cookiesAkun()['deviceid']."; _ga=GA1.2.80096599.1559215776; _gid=GA1.2.79762902.1559215776; ins-mig-done=1; ev=1; _mm3rm4bre_=6B%2FUJWvPEfAWe0iZqDpXOJ1YF8gkcXhrMXVyJC5tajloaHdpamgwem1uYnhrdmlldjQ%3D; accC=true; mp_41fb5b1708a7763a1be4054da0f74d65_mixpanel=%7B%22distinct_id%22%3A%20%2216b0880a02b18f-066b2c15aa7e45-e353165-100200-16b0880a02c862%22%2C%22%24device_id%22%3A%20%2216b0880a02b18f-066b2c15aa7e45-e353165-100200-16b0880a02c862%22%2C%22%24initial_referrer%22%3A%20%22%24direct%22%2C%22%24initial_referring_domain%22%3A%20%22%24direct%22%7D; content_viewc=3; token=JeLy0F7pzJK722MQXeXVcxqbZSdTNxOX; refresh_token=0nvFDJuHhlQ7gb5x21X5GUfzdpnM2vPz; _gat_UA-102334128-3=1; decide_session=".$this->cookiesAkun()['cookie'];
  81. $headers[] = "Host: www.marlboro.id";
  82. $headers[] = "Origin: https://www.marlboro.id";
  83. $headers[] = "Referer: https://www.marlboro.id/";
  84. $headers[] = "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW".rand(000, 999).") AppleWebKit/".rand(00000, 99999).".36 (KHTML, like Gecko) Chrome/72.0.".rand(00000, 99999).".".rand(00000, 99999)." Safari/".rand(00000, 99999).".36";
  85. $headers[] = "X-Requested-With: XMLHttpRequest";
  86. $csrf = $this->modules->getStr($this->modules->curl("https://www.marlboro.id/", null, false, true, false, $headers, 'GET'), 'name="decide_csrf" value="', '"', 1, 0);
  87. $update = $this->modules->curl("https://www.marlboro.id/article/video-play/".$idVidio, "decide_csrf=".$csrf."&log_id=".$log_id."&duration=11.113&total_duration=5&fetch=2&g-recaptcha-response=", false, true, false, $headers);
  88. return $update;
  89. }
  90.  
  91. private function getPoint()
  92. {
  93. $headers = array();
  94. $headers[] = "Content-Type: application/x-www-form-urlencoded; charset=UTF-8";
  95. $headers[] = "Cookie: "."deviceId=".$this->cookiesAkun()['deviceid']."; decide_session=".$this->cookiesAkun()['cookie'];
  96. $headers[] = "Host: www.marlboro.id";
  97. $get = $this->modules->curl("https://www.marlboro.id/profile", null, false, true, false, $headers, 'GET');
  98. return @$this->modules->getStr($get, '<div class="point">', '</div>', 1, 0);
  99. }
  100.  
  101. public function execute_login($email, $password)
  102. {
  103. for($o=1;$o<=10;$o++)
  104. {
  105. @$saldo_awal = $this->getPoint();
  106. $login = $this->login($email, $password);
  107. @$cookies = $this->modules->fetchCookies($login)['decide_session'];
  108. @$deviceid = $this->modules->fetchCookies($login)['deviceId'];
  109. if(strpos($login, '"code":200,"message":"success"'))
  110. {
  111. $this->modules->fwrite("cookiesAkun.txt", @$cookies."|".$email."|".$password."|".$deviceid.PHP_EOL);
  112. if(@$this->getPoint() == $saldo_awal)
  113. {
  114. print PHP_EOL."Limit Get Point Login...";
  115. return false;
  116. }else{
  117. print PHP_EOL."Success Login!, Point Anda : ".$this->getPoint()." Pts";
  118. }
  119. }elseif(strpos($login, '"message":"Please Accept GoAheadPeople T&C"')){
  120. print PHP_EOL."Failed Login!, Message : Please Accept GoAheadPeople T&C.. Retry!";
  121. }else{
  122. if(@file_exists("cookiesAkun.txt") == true){@unlink("cookiesAkun.txt");}if(@file_exists("cookiesMarlboro.txt") == true){@unlink("cookiesMarlboro.txt");}
  123. print PHP_EOL."Failed Login";
  124. return false;
  125. }
  126. }
  127. }
  128.  
  129. public function execute_nonton($email)
  130. {
  131. print PHP_EOL."Go Bot Nonton..";
  132. if(@file_exists("cookiesAkun.txt") == false){return "continue..";}if(@file_exists("cookiesMarlboro.txt") == false){return "continue..";}
  133. $ya = 1;
  134. for($b = $ya; $b <= ($ya + 20); $b++)
  135. {
  136. if($b%2 == 1)
  137. {
  138. @$saldo_awal = $this->getPoint();
  139. $idVidio = $this->modules->getStr($this->idVidio(), 'data-ref="https://www.marlboro.id/discovered/article/', '"', $b, 0);
  140. if(!empty($idVidio))
  141. {
  142. $view = $this->view($idVidio);
  143. $decide_session = $this->modules->fetchCookies($view)['decide_session'];
  144. $log_id = $this->getStr($view, '"log_id":"', '"', 1, 0);
  145. if(strpos($view, '"message":"Success to store log play video."'))
  146. {
  147. print PHP_EOL."Sedang Menonton : ".$idVidio;
  148. //sleep(20);
  149. $update = $this->update($idVidio, $decide_session, $log_id);
  150. if(strpos($update, '"finished":true'))
  151. {
  152. if(@$this->getPoint() == @$saldo_awal)
  153. {
  154. print PHP_EOL."Limit Get Point Nonton!, Done : ".$email." | ".$this->getPoint()." Pts";
  155. return false;
  156. }else{
  157. print PHP_EOL."Success Menonton!, Point anda : ".$this->getPoint()." Pts";
  158. }
  159. }else{
  160. print PHP_EOL."Failed!, Point Anda : ".$this->getPoint().PHP_EOL.$update;
  161. }
  162. }elseif(strpos($view, '"message":"Action is not allowed"')){
  163. print PHP_EOL."Failed Menonton Vidio!, Message : Action is not allowed..";
  164. return false;
  165. }else{
  166. print PHP_EOL."Response View : ".$view.PHP_EOL;
  167. }
  168. }else{
  169. print PHP_EOL."ID Vidio Tidak Ditemukan..";
  170. return false;
  171. }
  172. }
  173. }
  174. }
  175. }
  176.  
  177. class modules
  178. {
  179. public function curl($url, $params, $cookie, $cookiefile, $header, $httpheaders, $request = 'POST', $socks = "")
  180. {
  181. $cookies = "cookiesMarlboro.txt";
  182. $this->ch = curl_init();
  183.  
  184. curl_setopt($this->ch, CURLOPT_URL, $url);
  185. curl_setopt($this->ch, CURLOPT_POSTFIELDS, $params);
  186. curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, 0);
  187. curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1);
  188. curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, 1);
  189.  
  190. curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, $request);
  191.  
  192. if($cookie == true)
  193. {
  194. curl_setopt($this->ch, CURLOPT_COOKIEJAR, $cookies);
  195. }
  196.  
  197. if($cookiefile == true)
  198. {
  199. curl_setopt($this->ch, CURLOPT_COOKIEFILE, $cookies);
  200. }
  201.  
  202. curl_setopt($this->ch, CURLOPT_HEADER, $header);
  203. @curl_setopt($this->ch, CURLOPT_HTTPHEADER, $httpheaders);
  204.  
  205. curl_setopt($this->ch, CURLOPT_HTTPPROXYTUNNEL, 1);
  206. curl_setopt($this->ch, CURLOPT_PROXY, $socks);
  207. curl_setopt($this->ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
  208.  
  209. curl_setopt($this->ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
  210. $response = curl_exec($this->ch);
  211. return $response;
  212. curl_close($this->ch);
  213. }
  214.  
  215. public function getStr($page, $str1, $str2, $line_str2, $line)
  216. {
  217. $get = explode($str1, $page);
  218. $get2 = explode($str2, $get[$line_str2]);
  219. return $get2[$line];
  220. }
  221.  
  222. public function fetchCookies($source)
  223. {
  224. preg_match_all('/^Set-Cookie:\s*([^;]*)/mi', $source, $matches);
  225. $cookies = array();
  226. foreach($matches[1] as $item)
  227. {
  228. parse_str($item, $cookie);
  229. $cookies = array_merge($cookies, $cookie);
  230. }
  231.  
  232. return $cookies;
  233. }
  234.  
  235. public function fwrite($namafile, $data)
  236. {
  237. $fh = fopen($namafile, "a");
  238. fwrite($fh, $data);
  239. fclose($fh);
  240. }
  241. }
  242.  
  243. $modules = new modules();
  244. $marlboro = new marlboro();
  245.  
  246. //print $marlboro->login("kaowkawok@gmail.com", "npwilgans@");
  247. //print $marlboro->view("how-to-rock-suit-with-sneakers");
  248.  
  249. awal:
  250. echo "Input FIle Akun Marlboro (Email|Pass) : ";
  251. $fileakun = trim(fgets(STDIN));
  252.  
  253. if(empty(@file_get_contents($fileakun)))
  254. {
  255. print PHP_EOL."File Akun Tidak Ditemukan.. Silahkan Input Ulang".PHP_EOL;
  256. goto awal;
  257. }
  258.  
  259. print PHP_EOL."Total Ada : ".count(explode(PHP_EOL, @file_get_contents($fileakun)))." Akun ".PHP_EOL."Letsgo..";
  260.  
  261. while(true)
  262. {
  263. $time = date("Y-m-d H:i:s");
  264. echo PHP_EOL."Start Date : ".$time;
  265. foreach(@explode("\n", str_replace("\r", "", @file_get_contents($fileakun))) as $c => $akon)
  266. {
  267. $date = date("Y-m-d H:i:s");
  268. $email = explode("|", trim($akon))[0];
  269. $password = explode("|", trim($akon))[1];
  270. echo PHP_EOL.PHP_EOL."Ekse Akun : ".$email.PHP_EOL;
  271. $marlboro->execute_login($email, $password);
  272. $marlboro->execute_nonton($email);
  273. }
  274.  
  275. echo PHP_EOL.PHP_EOL."Sleep Time : ".$date;
  276. print PHP_EOL."All Done Run!, Sleep 24 Hours";
  277. print PHP_EOL."Start Besok : ".date('Y-m-d H:i:s', time() + (60 * 60 * 24));
  278. sleep(86400);
  279. }
  280.  
  281. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement