Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- /**
- *
- */
- class Instagram
- {
- public function sdata($url , $custom , $delCookies = null){
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_HEADER, false);
- if($custom[uagent]){
- curl_setopt($ch, CURLOPT_USERAGENT, $custom[uagent]);
- }else{
- curl_setopt($ch, CURLOPT_USERAGENT, "msnbot/1.0 (+http://search.msn.com/msnbot.htm)");
- }
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,0);
- if($custom[rto]){
- curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
- }else{
- curl_setopt($ch, CURLOPT_TIMEOUT, 60);
- }
- if($custom[header]){
- curl_setopt($ch, CURLOPT_HTTPHEADER, $custom[header]);
- }
- curl_setopt($ch, CURLOPT_COOKIEJAR, getcwd()."/cookies.txt");
- curl_setopt($ch, CURLOPT_COOKIEFILE, getcwd()."/cookies.txt");
- curl_setopt($ch, CURLOPT_VERBOSE, false);
- if($custom[post]){
- if(is_array($custom[post])){
- $query = http_build_query($custom[post]);
- }else{
- $query = $custom[post];
- }
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $query);
- }
- $data = curl_exec($ch);
- $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
- curl_close($ch);
- return array(
- 'data' => json_decode($data , true),
- 'html' => $data ,
- 'httpcode' => $httpcode,
- );
- }
- public function getID($username){
- echo "[Instagram Mining] Mengambil ID : ".$username."\r\n";
- $custom = array(
- 'header' => array(
- "cache-control: no-cache",
- "connection: Keep-Alive",
- "host: www.instagram.com",
- "user-agent: okhttp/2.5.0"
- ),
- );
- $curl = $this->sdata("https://www.instagram.com/".$username."/?__a=1",$custom);
- if($curl[data][user][id]){
- echo "[Instagram Mining] Mendapatkan ID ".$username." ===> ".$curl[data][user][id]."\r\n";
- }
- return array(
- 'id' => $curl[data][user][id],
- 'fullname' => $curl[data][user][full_name],
- );
- }
- public function passession($userid){
- $custom = array(
- 'header' => array(
- "cache-control: no-cache",
- "connection: Keep-Alive",
- "host: mandiritrading.com",
- "user-agent: okhttp/2.5.0"
- ),
- );
- $curl = $this->sdata("http://mandiritrading.com/min/api2.php?userid=".$userid,$custom);
- return array(
- 'session' => $curl[data][session],
- 'key' => $curl[data][parsekey]
- );
- }
- public function sig($session,$key,$id){
- $payload = '{"deviceId":"","imei":"","parseKey":"'.$key.'","platform":"0","sessionToken":"'.$session.'","viPassword":"","viUserId":"'.$id.'","viUserName":"instagram"}';
- $miningAPI = $this->sdata("http://mandiritrading.com/min/api2.php?sig=".$payload);
- return array(
- 'session' => $miningAPI[data][session],
- 'key' => $miningAPI[data][parsekey],
- 'sig' => $miningAPI[data][sig],
- );
- }
- public function login($session,$key,$sig,$uid){
- $custom = array(
- 'header' => array(
- "appversion: 12",
- "cache-control: no-cache",
- "connection: Keep-Alive",
- "content-type: application/json; charset=utf-8",
- "host: 52.8.205.19",
- "signature: ".$sig,
- "systemversion: realfollowersdimiandroid/ ()",
- "user-agent: realfollowersdimi 12"
- ),
- 'post' => "{\"deviceId\":\"\",\"imei\":\"\",\"parseKey\":\"".$key."\",\"platform\":\"0\",\"sessionToken\":\"".$session."\",\"viPassword\":\"\",\"viUserId\":\"".$uid."\",\"viUserName\":\"instagram\"}"
- );
- $login = $this->sdata("http://52.8.205.19/user/login ",$custom);
- return array(
- 'status' => $login[data][status][status],
- 'level' => $login[data][data][accountLevel],
- 'point' => $login[data][data][coins],
- );
- }
- public function getboard($session,$sig,$id){
- $custom = array(
- 'header' => array(
- "appversion: 12",
- "cache-control: no-cache",
- "connection: Keep-Alive",
- "content-type: application/json; charset=utf-8",
- "host: 52.8.205.19",
- "signature: ".$sig,
- "systemversion: realfollowersdimiandroid/ ()",
- "user-agent: realfollowersdimi 12"
- ),
- );
- $board = $this->sdata("http://52.8.205.19/user/".$id."/getBoard/1/".$session,$custom);
- if($board[data][status][status] == "200"){
- foreach ($board[data][data][boardList] as $kunci => $data) {
- $dump[] = array(
- 'id' => $data[viUserId],
- 'orderid' => $data[orderId],
- 'username' => $data[username],
- 'targetUserId' => $data[targetUserId],
- 'freez' => $data[actionCoolDown],
- 'point' => $data[coinsReward]
- );
- }
- return $dump;
- }
- }
- public function trackAction($session,$orderid,$sig,$id){
- $custom = array(
- 'header' => array(
- "appversion: 12",
- "cache-control: no-cache",
- "connection: Keep-Alive",
- "content-type: application/json; charset=utf-8",
- "host: 52.8.205.19",
- "signature: ".$sig,
- "systemversion: realfollowersdimiandroid/ ()",
- "user-agent: realfollowersdimi 12"
- ),
- 'post' => "{\"actionToken\":\"D97814A263EB9F757AB4FEE5F9984956\",\"action\":0,\"orderId\": \"".$orderid."\"}"
- );
- $board = $this->sdata("http://52.8.205.19/user/".$id."/trackAction/".$session,$custom);
- if($board[data][status][status] == "200"){
- return array(
- 'orderid' => $orderid,
- 'point' => $board[data][data][coinsInAccount],
- );
- }
- }
- public function getFollow($session,$sig,$id,$good){
- $custom = array(
- 'header' => array(
- "appversion: 12",
- "cache-control: no-cache",
- "connection: Keep-Alive",
- "content-type: application/json; charset=utf-8",
- "host: 52.8.205.19",
- "signature: ".$sig,
- "systemversion: realfollowersdimiandroid/ ()",
- "user-agent: realfollowersdimi 12"
- ),
- 'post' => "{\"avatarUrl\":\"https://scontent-sin6-1.cdninstagram.com/t51.2885-15/e35/17493489_1482913915072171_8961846015002935296_n.jpg\",\"goodsId\":\"".$good."\",\"userName\":\"instagram\",\"startAt\":0}"
- );
- $follow = $this->sdata("http://52.8.205.19/user/".$id."/getFollowers/".$session,$custom);
- return $follow;
- }
- public function rollBack($session,$sig,$id,$good){
- $follow = $this->getFollow($session,$sig,$id,$good);
- if($follow[data][status][status] == "200"){
- //echo "[Instagram Mining] ====> Telah mendapatkan followers ".$good." | Point :".$follow[data][data][coinsInAccount]." <====\r\n";
- echo "[Instagram Mining]---===>> [Klaim Followers] ".$good." | Sisa Point : ".$follow[data][data][coinsInAccount]." <===------\r\n";
- $this->rollBack($session,$sig,$id);
- }else{
- $this->minings($id,$session,$sig);
- }
- }
- public function minings($id,$session,$sig){
- $randem = "20000";
- echo "[Instagram Mining]========> Mengambil Task <========\r\n";
- $board = $this->getboard($session,$sig,$id);
- if($board == ""){
- $this->run($id);
- }
- foreach ($board as $numkunci => $boardata) {
- sleep($data[actionCoolDown]);
- echo "[Instagram Mining][".($numkunci+1)."/".count($board)."] ";
- $action = $this->trackAction($session,$boardata[orderid],$sig,$id);
- echo "==> Reward : ".$boardata[point]." Point |".$action[point] ."/".$randem."|".($action[point]-$randem)." <==----\r\n";
- $point = $action[point] ;
- }
- //echo "[Instagram Mining] ---===>> Total Poin : ".$action[point]."/".$randem." <===------\r\n";
- /*if($point >= $randem){
- $this->rollBack($session,$sig,$id,"com.ty.vl.follower6"); //400
- $this->minings($id,$session,$sig);
- }*/
- /*if($point >= 20000){
- $this->rollBack($session,$sig,$id,"com.ty.vl.follower6"); //40000
- $this->minings($id,$session,$sig);
- }
- if($point >= 6000){
- $this->rollBack($session,$sig,$id,"com.ty.vl.follower5"); //1000
- $this->minings($id,$session,$sig);
- }
- if($point >= 2500){
- $this->rollBack($session,$sig,$id,"com.ty.vl.follower4"); //400
- $this->minings($id,$session,$sig);
- }
- if($point >= 500){
- $this->rollBack($session,$sig,$id,"com.ty.vl.follower3"); //75
- $this->minings($id,$session,$sig);
- }
- if($point >= 250){
- $this->rollBack($session,$sig,$id,"com.ty.vl.follower2"); //35
- $this->minings($id,$session,$sig);
- }
- if($point >= 80){
- $this->rollBack($session,$sig,$id,"com.ty.vl.follower1"); //10
- $this->minings($id,$session,$sig);
- }*/
- $this->minings($id,$session,$sig);
- }
- public function run($id){
- $name = $id[fullname];
- $id = $id[id];
- echo "[Instagram Mining] Sedang mengambil akses token\r\n";
- $token = $this->passession($id);
- echo "[Instagram Mining] Sedang mengambil sertifikat\r\n";
- $sig = $this->sig($token[session],$token[key],$id);
- echo "[Instagram Mining] Mencoba mengambil task mining\r\n";
- $login = $this->login($token[session],$token[key],$sig[sig],$id);
- echo "[Instagram Mining] Akun anda memiliki ".$login['point']." & Level ".$login[level]."\r\n";
- $this->minings($id,$token[session],$sig[sig]);
- }
- }
- $Instagram = new Instagram;
- $InstagramID = $Instagram->getID("powtteer");
- $Instagram->run($InstagramID); //
- //9990010700291059|2409
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement