Advertisement
JakRapp

FFT Instagram

Oct 13th, 2016
6,652
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.16 KB | None | 0 0
  1. <?php
  2. $usernameig = "..."; //Ganti ... Dengan Usernameig kalian
  3. $passwordig = "..."; //Ganti ... Dengan Passwordig kalian
  4. $targetig = "..."; //Ganti ... Dengan targetig kalian
  5. $tipeig = "followers"; //followers atau following seterah kalian
  6. $jumlahig = "..."; //Jumlah yang ingin di follow 100-1000
  7. ###########################################################################################################################################
  8. /* TOLONG HARGAI KAMI JANGAN HAPUS KATA2 DI BAWAH INI ,SOALNYA KAMI INGIN TERKENAL JUGA */
  9. /* Coded By JakRapp */
  10. /* Twitter -> @JakRapp_ */
  11. /* Instagram -> jakrapp_ */
  12. /* Blogger -> http://www.jakrapp.com */
  13. ###########################################################################################################################################
  14. //Ini API.php
  15. set_time_limit(0);
  16. ignore_user_abort(1);
  17.     function proccess($ighost, $useragent, $url, $cookie = 0, $data = 0, $httpheader = array(), $proxy = 0){
  18.         $url = $ighost ? 'https://i.instagram.com/api/v1/' . $url : $url;
  19.         $ch = curl_init($url);
  20.         curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
  21.         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  22.         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  23.         curl_setopt($ch, CURLOPT_TIMEOUT, 20);
  24.         if($proxy):
  25.             curl_setopt($ch, CURLOPT_PROXY, $proxy);
  26.         endif;
  27.         if($httpheader) curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader);
  28.         curl_setopt($ch, CURLOPT_HEADER, 1);
  29.         if($cookie) curl_setopt($ch, CURLOPT_COOKIE, $cookie);
  30.         if ($data):
  31.             curl_setopt($ch, CURLOPT_POST, 1);
  32.             curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
  33.         endif;
  34.         $response = curl_exec($ch);
  35.         $httpcode = curl_getinfo($ch);
  36.         if(!$httpcode) return false; else{
  37.             $header = substr($response, 0, curl_getinfo($ch, CURLINFO_HEADER_SIZE));
  38.             $body = substr($response, curl_getinfo($ch, CURLINFO_HEADER_SIZE));
  39.             curl_close($ch);
  40.             return array($header, $body);
  41.         }
  42.     }
  43.     function generate_useragent($sign_version = '6.22.0'){
  44.         $resolusi = array('1080x1776','1080x1920','720x1280', '320x480', '480x800', '1024x768', '1280x720', '768x1024', '480x320');
  45.         $versi = array('GT-N7000', 'SM-N9000', 'GT-I9220', 'GT-I9100');     $dpi = array('120', '160', '320', '240');
  46.         $ver = $versi[array_rand($versi)];
  47.         return 'Instagram '.$sign_version.' Android ('.mt_rand(10,11).'/'.mt_rand(1,3).'.'.mt_rand(3,5).'.'.mt_rand(0,5).'; '.$dpi[array_rand($dpi)].'; '.$resolusi[array_rand($resolusi)].'; samsung; '.$ver.'; '.$ver.'; smdkc210; en_US)';
  48.     }
  49.     function hook($data) {
  50.         return 'ig_sig_key_version=4&signed_body=' . hash_hmac('sha256', $data, '469862b7e45f078550a0db3687f51ef03005573121a3a7e8d7f43eddb3584a36') . '.' . urlencode($data);
  51.     }
  52.     function generate_device_id(){
  53.         return 'android-' . md5(rand(1000, 9999)).rand(2, 9);
  54.     }
  55.     function generate_guid($tipe = 0){
  56.         $guid = sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
  57.         mt_rand(0, 65535),
  58.         mt_rand(0, 65535),
  59.         mt_rand(0, 65535),
  60.         mt_rand(16384, 20479),
  61.         mt_rand(32768, 49151),
  62.         mt_rand(0, 65535),
  63.         mt_rand(0, 65535),
  64.         mt_rand(0, 65535));
  65.         return $tipe ? $guid : str_replace('-', '', $guid);
  66.     }
  67.     $ua = generate_useragent();
  68.         $devid = generate_device_id();
  69.         $login = proccess(1, $ua, 'accounts/login/', 0, hook('{"device_id":"'.$devid.'","guid":"'.generate_guid().'","username":"'.$usernameig.'","password":"'.$passwordig.'","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}'));
  70.         $data = json_decode($login[1]);
  71.         if($data->status != 'ok')
  72.             print ' <html>
  73.         <body>
  74.         <center>Username / Password Instagrammu salah</center>';
  75.         else{
  76.             preg_match_all('%Set-Cookie: (.*?);%',$login[0],$d);$cookie = '';
  77.             for($o=0;$o<count($d[0]);$o++)$cookie.=$d[1][$o].";";
  78.             $_SESSION['data'] = array('cookies' => $cookie, 'useragent' => $ua, 'device_id' => $devid, 'username' => $data->logged_in_user->username, 'id' => $data->logged_in_user->pk);
  79.              }
  80.     //Beres
  81. //INi Fungsi Asli
  82. $limit_unfollow = $jumlahig; // jumlah maksimal yang mau difollow , jika mau ngefollow semua daftar silahkan isi 'maksimal' ..pakai ' petik
  83. $with_delay = 1; // jumlah delaynya
  84. $target = $targetig ; // username target yang mau dilihat
  85. $whitelist = array(); // tambahkan user yang tidak ingin difolow misalnya: array('id_instagram','id_instagram2');
  86. $listaccounts = $_SESSION['data'];
  87. $jenis = $tipeig;
  88. if($jenis != 'followers'){
  89.     $tipe = 'following';
  90. } else { $tipe = 'followers'; }
  91. $curl_ig=curl_init('https://www.instagram.com/'.$target.'/');
  92. curl_setopt($curl_ig,CURLOPT_RETURNTRANSFER,1);
  93. curl_setopt($curl_ig,CURLOPT_SSL_VERIFYPEER,0);
  94. curl_setopt($curl_ig,CURLOPT_USERAGENT,"Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20100101 Firefox/21.0");
  95. $curl_user=curl_exec($curl_ig);$user=curl_getinfo($curl_ig);curl_close($curl_ig);
  96. if($user['http_code']!==200) die('
  97.        <body>
  98.        <center>Username tidak tersedia</center>');
  99. preg_match('#", "id": "(.*?)", "biography": "#',$curl_user,$id);
  100. $target = $id[1];
  101.         $getinfo = proccess(1, $listaccounts['useragent'], 'users/'.$target.'/info/');
  102.         $getinfo = json_decode($getinfo[1]);
  103.         $limit_unfollow = ($limit_unfollow=='maksimal') ? $getinfo->user->following_count-1 : $limit_unfollow-1;
  104.         $curl_ig = 0;
  105.         $listids = array();
  106.         $unuser = array();
  107.         do{
  108.             $parameters = ($curl_ig>0) ? '?max_id='.$curl_ig : '';
  109.             $req = proccess(1, $listaccounts['useragent'], 'friendships/'.$target.'/'.$tipe.'/'.$parameters, $listaccounts['cookies']);
  110.             $req = json_decode($req[1]);
  111.             for($i=0;$i<count($req->users);$i++):
  112.                 if(count($listids)<=$limit_unfollow)
  113.                     $listids[count($listids)] = $req->users[$i]->pk;
  114.             endfor;
  115.             $curl_ig = (isset($req->next_max_id)) ? $req->next_max_id : 0;
  116.         }while(count($listids)<=$limit_unfollow);
  117.         for($i=0;$i<count($listids);$i++):
  118.             if(!in_array($listids[$i], $whitelist)):
  119.                     $curl_igross = proccess(1, $listaccounts['useragent'], 'friendships/create/'.$listids[$i].'/', $listaccounts['cookies'], hook('{"user_id":"'.$listids[$i].'"}'));
  120.                     sleep($with_delay);
  121.                     ;
  122.                     flush();
  123.             endif;
  124.         endfor;
  125. //Beres
  126.  
  127.     ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement