HenryGlazt

like

Oct 26th, 2018
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.16 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. class curl {
  4.     var $ch, $agent, $error, $info, $cookiefile, $savecookie;  
  5.     function curl() {
  6.         $this->ch = curl_init();
  7.         curl_setopt ($this->ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.1 (KHTML, like Gecko) Chrome/2.0.164.0 Safari/530.1');
  8.         curl_setopt ($this->ch, CURLOPT_HEADER, 1);
  9.         curl_setopt ($this->ch, CURLOPT_RETURNTRANSFER, 1);
  10.         curl_setopt ($this->ch, CURLOPT_SSL_VERIFYPEER, 0);
  11.         curl_setopt ($this->ch, CURLOPT_SSL_VERIFYHOST, 0);
  12.         curl_setopt ($this->ch, CURLOPT_FOLLOWLOCATION,true);
  13.         curl_setopt ($this->ch, CURLOPT_TIMEOUT, 30);
  14.         curl_setopt ($this->ch, CURLOPT_CONNECTTIMEOUT,30);
  15.     }
  16.     function header($header) {
  17.         curl_setopt ($this->ch, CURLOPT_HTTPHEADER, $header);
  18.     }
  19.     function http_code() {
  20.         return curl_getinfo($this->ch, CURLINFO_HTTP_CODE);
  21.     }
  22.     function error() {
  23.         return curl_error($this->ch);
  24.     }
  25.     function ssl($veryfyPeer, $verifyHost){
  26.         curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, $veryfyPeer);
  27.         curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, $verifyHost);
  28.     }
  29.     function cookies($cookie_file_path) {
  30.         $this->cookiefile = $cookie_file_path;;
  31.         $fp = fopen($this->cookiefile,'wb');fclose($fp);
  32.         curl_setopt ($this->ch, CURLOPT_COOKIEJAR, $this->cookiefile);
  33.         curl_setopt ($this->ch, CURLOPT_COOKIEFILE, $this->cookiefile);
  34.     }
  35.     function proxy($sock) {
  36.         curl_setopt ($this->ch, CURLOPT_HTTPPROXYTUNNEL, true);
  37.         curl_setopt ($this->ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
  38.         curl_setopt ($this->ch, CURLOPT_PROXY, $sock);
  39.     }
  40.     function post($url, $data) {
  41.         curl_setopt($this->ch, CURLOPT_POST, 1);   
  42.         curl_setopt($this->ch, CURLOPT_POSTFIELDS, $data);
  43.         return $this->getPage($url);
  44.     }
  45.     function data($url, $data, $hasHeader=true, $hasBody=true) {
  46.         curl_setopt ($this->ch, CURLOPT_POST, 1);
  47.         curl_setopt ($this->ch, CURLOPT_POSTFIELDS, http_build_query($data));
  48.         return $this->getPage($url, $hasHeader, $hasBody);
  49.     }
  50.     function get($url, $hasHeader=true, $hasBody=true) {
  51.         curl_setopt ($this->ch, CURLOPT_POST, 0);
  52.         return $this->getPage($url, $hasHeader, $hasBody);
  53.     }  
  54.     function getPage($url, $hasHeader=true, $hasBody=true) {
  55.         curl_setopt($this->ch, CURLOPT_HEADER, $hasHeader ? 1 : 0);
  56.         curl_setopt($this->ch, CURLOPT_NOBODY, $hasBody ? 0 : 1);
  57.         curl_setopt ($this->ch, CURLOPT_URL, $url);
  58.         $data = curl_exec ($this->ch);
  59.         $this->error = curl_error ($this->ch);
  60.         $this->info = curl_getinfo ($this->ch);
  61.         return $data;
  62.     }
  63. }
  64.  
  65. function fetch_value($str,$find_start,$find_end) {
  66.     $start = @strpos($str,$find_start);
  67.     if ($start === false) {
  68.         return "";
  69.     }
  70.     $length = strlen($find_start);
  71.     $end    = strpos(substr($str,$start +$length),$find_end);
  72.     return trim(substr($str,$start +$length,$end));
  73. }
  74. function string($length = 15)
  75. {
  76.     $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
  77.     $charactersLength = strlen($characters);
  78.     $randomString = '';
  79.     for ($i = 0; $i < $length; $i++) {
  80.         $randomString .= $characters[rand(0, $charactersLength - 1)];
  81.     }
  82.     return $randomString;
  83. }
  84. function angka($length = 15)
  85. {
  86.     $characters = '0123456789';
  87.     $charactersLength = strlen($characters);
  88.     $randomString = '';
  89.     for ($i = 0; $i < $length; $i++) {
  90.         $randomString .= $characters[rand(0, $charactersLength - 1)];
  91.     }
  92.     return $randomString;
  93. }
  94. function coin($userid,$session) {
  95.  
  96.     $curl = new curl();
  97.     $curl->cookies('cookies/'.md5($_SERVER['REMOTE_ADDR']).'.txt');
  98.     $curl->ssl(0, 2);
  99.  
  100.     $headers = array();
  101.     $headers[] = 'User-Agent: thousandfollowers 4';
  102.     $headers[] = 'systemVersion: thousandfollowersandroid/ ()';
  103.     $headers[] = 'Host: instalike.socialmarkets.info';
  104.     $headers[] = 'Content-Type: application/json; charset=utf-8';
  105.     $headers[] = 'Connection: Keep-Alive';
  106.     $curl->header($headers);
  107.  
  108.     $get = array();
  109.     $get[0] = $curl->get('http://instalike.socialmarkets.info/user/'.$userid.'/getBoard/0/'.$session.'');
  110.     $get[1] = $curl->get('http://instalike.socialmarkets.info/user/'.$userid.'/getBoard/1/'.$session.'');
  111.     $rand = rand(0,1);
  112.     $offer = $get[$rand];
  113.     preg_match_all('/"orderId":([0-9.]+)/s', $offer, $id);
  114.     $orderId = $id[1];
  115.     $random = rand(0,29);
  116.     $angka = string(32);
  117.     $randid =  $orderId[$random];
  118.  
  119.  
  120.     $page = $curl->post('http://instalike.socialmarkets.info/user/'.$userid.'/trackAction/'.$session.'', '{
  121.     "action":0,
  122.     "actionToken":"'.$angka.'",
  123.     "orderId":'.$randid.'
  124. }');
  125.  
  126.  
  127.     $coin = fetch_value($page, '"coinsInAccount":"','"');
  128.  
  129.     if (strpos($page, '"statusMsg":"Success"')) {
  130.         echo "SUCCESS | ".$coin."\n";
  131.         flush();
  132.         ob_flush();
  133.     } else {
  134.         echo "FAILED";
  135.         echo "\n";
  136.         flush();
  137.         ob_flush();
  138.     }
  139.  
  140.  
  141.  
  142.  
  143. }
  144.  
  145. echo
  146. "
  147. ===================================================
  148.  
  149.      CREATED BY YUDHA TIRA PAMUNGKAS
  150.  https://www.facebook.com/yudha.t.pamungkas.3
  151.  
  152. ===================================================
  153. \n";
  154. echo "UserID (Ex: 4058101226): ";
  155. $userid = trim(fgets(STDIN));
  156. echo "Session (Ex: 15eda6feb1a79734d2f69f2a6ccf8292a5511ce8dc9a95f02f1112e01df0ed07): ";
  157. $session = trim(fgets(STDIN));
  158. if ($userid == "") {
  159.     die ("UserID cannot be blank!\n");
  160. } elseif($session == "") {
  161.     die ("Session cannot be blank!\n");
  162. } else {
  163.     while (true) {
  164.         coin($userid, $session);
  165.     }
  166. }
  167.  
  168.  
  169.  
  170.  
  171. ?>
Advertisement
Add Comment
Please, Sign In to add comment