Advertisement
Guest User

Dada

a guest
Dec 2nd, 2016
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. <?php
  2. require_once("lib/fungsi.php");
  3. $username = $_GET['username'];
  4. $password = $_GET['password'];
  5. $ua = generate_useragent();
  6. $devid = generate_device_id();
  7. $login = proccess(1, $ua, 'accounts/login/', 0, hook('{"device_id":"'.$devid.'","guid":"'.generate_guid().'","username":"'.$username.'","password":"'.$password.'","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}'));
  8. $obj = @json_decode($login[1], true);
  9. $status = $obj['status'];
  10. $message = $obj['message'];
  11. $pk = $obj['logged_in_user']['pk'];
  12. if ($status == 'fail') {
  13. echo $message;
  14. } else {
  15. preg_match_all('%Set-Cookie: (.*?);%',$login[0],$d);$cookies = '';
  16. for($o=0;$o<count($d[0]);$o++)$cookies.=$d[1][$o].";";
  17. $c=curl_init('https://www.instagram.com/');
  18. curl_setopt($c,CURLOPT_RETURNTRANSFER,1);
  19. curl_setopt($c,CURLOPT_SSL_VERIFYPEER,0);
  20. curl_setopt($c,CURLOPT_USERAGENT,"Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20100101 Firefox/21.0");
  21. $x=curl_exec($c);$mama=curl_getinfo($c);curl_close($c);
  22. if($mama['http_code']!==200)
  23. print 'Invalid Username Target!';
  24. else{
  25. $limit = 10; // Jumlah yang mau di follow,mau sampe habis ? tinggal isi 'sampehabis'
  26. $iki = "367005646|1520994144|1440116683|367005646"; //ganti sama ID instagram target
  27. $ganteng = explode("|", $iki);
  28. $target = $ganteng[mt_rand(0, count($ganteng)-1)];
  29. $limit = ($limit=='sampehabis') ? $getinfo->user->following_count-1 : $limit-1;
  30. $c = 0;
  31. $listids = array();
  32. do{
  33. $parameters = ($c>0) ? '?max_id='.$c : '';
  34. $req = proccess(1, $ua, 'friendships/'.$target.'/followers/'.$parameters, $cookies);
  35. $req = json_decode($req[1]);
  36. for($i=0;$i<count($req->users);$i++):
  37. if(count($listids)<=$limit)
  38. $listids[count($listids)] = $req->users[$i]->pk;
  39. endfor;
  40. $c = (isset($req->next_max_id)) ? $req->next_max_id : 0;
  41. }while(count($listids)<=$limit);
  42. for($i=0;$i<=count($listids);$i++){
  43. $cross = proccess(1, $ua, 'friendships/create/'.$listids[$i].'/', $cookies, hook('{"user_id":"'.$listids[$i].'"}'));
  44. echo $cross[1]."<br>" .$target;
  45.  
  46. }
  47. }
  48. }
  49. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement