Guest User

Nero - wmaraci

a guest
Oct 4th, 2015
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.80 KB | None | 0 0
  1. <?php
  2. // ?start=0
  3.  
  4. @session_start();
  5. @set_time_limit(0);
  6. @ignore_user_abort(TRUE);
  7.  
  8. if(@ob_get_level() == 0)
  9. @ob_start();
  10.  
  11.  
  12. # Gerekli Dosyalar
  13. include "config.php";
  14.  
  15. # POST
  16. $appID = 1;
  17. $saniye = 2;
  18. $accounts = file_get_contents('sifre.txt'); //file($_SERVER['DOCUMENT_ROOT'].'/admin/json/accs.txt');
  19. $accounts = addslashes(trim($accounts));
  20. $arrayx = explode("\n", $accounts);
  21.  
  22. if ( $appID && $accounts )
  23. {
  24. $appDetay = DB::getRow("SELECT * FROM applications WHERE id = '$appID'");
  25.  
  26. $_SESSION['appID'] = appID;
  27. DB::query("UPDATE applications SET uStatus = '0'");
  28. DB::query("UPDATE applications SET uStatus = '1' WHERE id = '$appID'");
  29.  
  30. # İnstagram API
  31. $instagram = new Instagram(array(
  32. 'apiKey' => $appDetay->clientID,
  33. 'apiSecret' => $appDetay->clientSecret,
  34. 'apiCallback' => $appDetay->callbackURL
  35. ));
  36.  
  37. # İnstagram Oauth
  38. $auth = new instaAuth;
  39. $auth->setCacheFolder("../../cookies/");
  40. $auth->setCacheExtension(".selco");
  41. $auth->setProxy(json_decode($siteAyarlari->proxy, TRUE));
  42. $auth->setAuthURL($instagram->getLoginUrl());
  43.  
  44. $start = (!isset($_GET['start']) ? 0 : (int)$_GET['start']);
  45. $end = (!isset($_GET['start']) ? count($arrayx) : (int)$_GET['start'] + (250));
  46.  
  47. echo "<font color='green'>başlandı $start - $end</font><br/>";
  48. ob_flush(); flush();
  49.  
  50. $success = 0;
  51. for($i=$start;$i<$end;$i++) {
  52. try {
  53. $list = str_replace("\r", "", $arrayx[$i]);
  54. $parcala = explode(":", $list);
  55. $username = trim($parcala[0]);
  56. $password = trim($parcala[1]);
  57.  
  58. if ( $username && $password ) {
  59. $login = $auth->_login($username, $password, TRUE);
  60. if ( $login->login == TRUE ) {
  61. # İnstagram Oauth 2
  62. $auth2 = new instaAuth;
  63. $auth2->setCacheFolder("../../api_cookies/");
  64. $auth2->setCacheExtension(".selco");
  65. $auth2->setProxy(json_decode($siteAyarlari->proxy, TRUE));
  66. $auth2->_authLogin($username, $password);
  67.  
  68. $a = curl_get_file_contents($login->code);
  69. ob_flush(); flush();
  70. if ( stripos($a, "./home") !== FALSE ) {
  71. $userKontrol = DB::getVar("SELECT count(id) FROM members WHERE appID = '" . $appDetay->id . "' AND iUserName = '" . $login->data->username . "'");
  72. if ( $userKontrol > 0 ) {
  73. ( $login->data->gender == 'female' ) ? $genderID = 2 : $genderID = 1;
  74. DB::query("UPDATE members SET iPassword = '$password', iGender = '$genderID', iCookie = '1' WHERE appID = '" . $appDetay->id . "' AND iUserName = '" . $login->data->username . "'");
  75.  
  76. echo "<font color='green'>$i - $username:$password - $success</font><br/>";
  77. ob_flush(); flush();
  78.  
  79. $success++;
  80.  
  81. if ( $success % 2 == 0 ) sleep($saniye);
  82. }
  83. }
  84. }
  85. } else {
  86. echo "<font color='red'>$i - boş veri - $success</font><br/>";
  87. ob_flush(); flush();
  88. }
  89. } catch (Exception $e ) {
  90. echo "<font color='red'>$i - {$e->getMessage()} - $success</font><br/>";
  91. ob_flush(); flush();
  92. }
  93. }
  94.  
  95. DB::query("UPDATE applications SET uStatus = '0'");
  96. DB::query("UPDATE applications SET uStatus = '1' WHERE id = '{$_SESSION['appID']}'");
  97.  
  98. echo '<font color="green">$İsteğiniz doğrultusunda <strong>' . count($arrayx) .'</strong> hesaptan <strong>' . $success . '</strong> adeti sisteminize eklenebilmiştir.</font>';
  99. ob_flush(); flush();
  100.  
  101. if(isset($_GET['start'])) {
  102. echo '<script>document.location.href="ayiklayici.php?start='.$end.'";</script>
  103. <meta http-equiv="refresh" content="0;url=ayiklayici.php?start='.$end.'"/>';
  104. }
  105. } else {
  106. echo "<font color='red'>HATA</font>";
  107. ob_flush(); flush();
  108. }
  109.  
  110. @ob_end_flush();
Advertisement
Add Comment
Please, Sign In to add comment