Advertisement
Guest User

Untitled

a guest
Jul 5th, 2017
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.78 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 3.0.7.0
  8. * @ Author : DeZender
  9. * @ Release on : 22.06.2017
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. $dizin = $_SERVER['DOCUMENT_ROOT'] . '/license.php';
  15. include $dizin;
  16. $lisans['site'] = getenv( 'HTTP_HOST' );
  17.  
  18. if (substr( $lisans['site'], 0, 4 ) == 'www.') {
  19. $lisans['site'] = substr( $lisans['site'], 4 );
  20. }
  21.  
  22. $bas = 'Ä°NSTASCRÄ°PT-';
  23. $des = '-RYBO58D-';
  24. $yil = date( Y );
  25. $son = '-';
  26. $s = 'md5';
  27. $m = 'sha1';
  28. $a = 'md5';
  29. $q = strtoupper( $s( $m( $s( $lisans['site'] ) ) ) );
  30. $bos = substr( $q, 5, 7 );
  31. $lisans['hash'] = wordwrap( strtoupper( $s( $a( $s( $a( $m( $s( $a( $m( $lisans['site'] . date( 'YmdH' ) ) ) ) ) ) ) ) ) ), 7, '-', true );
  32. $liskod = $lisans['hash'];
  33. $cevir = strrev( $liskod );
  34. $bcs = $bas . $bos . $des . $cevir . $son . $yil;
  35.  
  36. if ($bcs !== $lisanskodu) {
  37. $lisans_cevap = 'http://www.etkilibey.com/kontrol.php?site=' . $lisans['site'];
  38. $ch = curl_init( );
  39. curl_setopt( $ch, CURLOPT_URL, $lisans_cevap );
  40. curl_setopt( $ch, CURLOPT_HEADER, false );
  41. curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
  42. curl_setopt( $ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT'] );
  43. curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
  44. $lisans_cevap = curl_exec( $ch );
  45. curl_close( $ch );
  46.  
  47. if ($lisans_cevap != '1') {
  48. echo '<iframe src="http://www.etkilibey.com/lshata.php" style="position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;">' . "\n" . '</iframe>';
  49. exit( );
  50. }
  51. else {
  52. $lyaz = fopen( $dizin, 'w+' );
  53. @fwrite( $lyaz, '<?php' . "\n" . '/**' . "\n\t\n" . ' Bu dosyaya herhangi bir lisans kodu yazmaniz gerekmez' . "\n" . ' Almis oldugunuz urune ait lisans sistemde aktif oldugunda' . "\n" . ' Lisans kodunuz otomatik olarak girilecektir.' . "\n\t\n" . ' Yeni lisans almak icin www.etkilibey.com adresini ziyaret edebilirsiniz' . "\n" . ' ' . "\n" . '*/' . "\n" . '$lisanskodu="' . $bcs . '";' . "\n" . '?>' );
  54. fclose( $lyaz );
  55. }
  56. }
  57.  
  58. define( 'INSTAWEB_VERSION', str_replace( 'InstaWebV', '', basename( __FILE__, '.php' ) ) );
  59.  
  60. class Instagram
  61. {
  62. protected $username = null;
  63. protected $password = null;
  64. protected $debug = null;
  65. protected $uuid = null;
  66. protected $device_id = null;
  67. protected $username_id = null;
  68. /**
  69. * @var Settings
  70. */
  71. public $settings = null;
  72. protected $userAgent = null;
  73. protected $token = null;
  74. protected $isLoggedIn = false;
  75. protected $rank_token = null;
  76. protected $IGDataPath = null;
  77.  
  78. /**
  79. * Default class constructor.
  80. *
  81. * @param string $username
  82. * Your Instagram username.
  83. * @param string $password
  84. * Your Instagram password.
  85. * @param $debug
  86. * Debug on or off, false by default.
  87. * @param $IGDataPath
  88. * Default folder to store data, you can change it.
  89. */
  90. public function __construct($username, $password, $debug = false, $IGDataPath = NULL)
  91. {
  92. $username = trim( $username );
  93. $password = trim( $password );
  94. $this->debug = $debug;
  95. $this->device_id = SignatureUtils::generateDeviceId( md5( $username . $password ) );
  96.  
  97. if (!(is_null( $IGDataPath ))) {
  98. $this->IGDataPath = $IGDataPath;
  99. }
  100. else {
  101. $this->IGDataPath = Wow::get( 'project/cookiePath' ) . 'instagram/';
  102. }
  103.  
  104. $this->checkSettings( $username );
  105. $this->setUser( $username, $password );
  106. }
  107.  
  108. /**
  109. * Set the user. Manage multiple accounts.
  110. *
  111. * @param string $username
  112. * Your Instagram username.
  113. * @param string $password
  114. * Your Instagram password.
  115. */
  116. public function setUser($username, $password)
  117. {
  118. $this->username = $username;
  119. $this->password = $password;
  120. $this->checkSettings( $username );
  121. $this->uuid = SignatureUtils::generateUUID( true );
  122. if (file_exists( $this->IGDataPath . (string) $this->username . '.dat' ) && ($this->settings->get( 'username_id' ) != NULL) && ($this->settings->get( 'token' ) != NULL)) {
  123. $this->isLoggedIn = true;
  124. $this->username_id = $this->settings->get( 'username_id' );
  125. $this->rank_token = $this->username_id . '_' . $this->uuid;
  126. $this->token = $this->settings->get( 'token' );
  127. }
  128. else {
  129. $this->isLoggedIn = false;
  130. }
  131. }
  132.  
  133. protected function checkSettings($username)
  134. {
  135. $this->settings = new Settings( $this->IGDataPath . $username . '.cnf' );
  136.  
  137. if ($this->settings->get( 'version' ) == NULL) {
  138. $this->settings->set( 'version', Constants::VERSION );
  139. }
  140.  
  141. if ($this->settings->get( 'ip' ) == NULL) {
  142. $this->settings->set( 'ip', '78.' . rand( 160, 191 ) . '.' . rand( 1, 255 ) . '.' . rand( 1, 255 ) );
  143. }
  144.  
  145. if (($this->settings->get( 'user_agent' ) == NULL) || (version_compare( $this->settings->get( 'version' ), Constants::VERSION ) == -1)) {
  146. $userAgent = new UserAgent( $this );
  147. $ua = $userAgent->buildUserAgent( );
  148. $this->settings->set( 'version', Constants::VERSION );
  149. $this->settings->set( 'user_agent', $ua );
  150. }
  151.  
  152. $this->userAgent = $this->settings->get( 'user_agent' );
  153. }
  154.  
  155. public function getData()
  156. {
  157. return array(
  158. 'username' => $this->username,
  159. 'password' => $this->password,
  160. 'username_id' => $this->username_id,
  161. 'uuid' => $this->uuid,
  162. 'token' => $this->token,
  163. 'rank_token' => $this->rank_token,
  164. 'user_agent' => $this->userAgent,
  165. 'ip' => $this->settings->get( 'ip' )
  166. );
  167. }
  168.  
  169. /**
  170. * Login to Instagram.
  171. *
  172. * @param bool $force
  173. * Force login to Instagram, this will create a new session
  174. *
  175. * @return array
  176. * Login data
  177. */
  178. public function login($force = false)
  179. {
  180. if (!($this->isLoggedIn) || $force) {
  181. $fetch = $this->request( 'si/fetch_headers/?challenge_type=signup&guid=' . SignatureUtils::generateUUID( false ), NULL, true );
  182. preg_match( '#Set-Cookie: csrftoken=([^;]+)#', $fetch[0], $token );
  183. $data = array(
  184. 'phone_id' => SignatureUtils::generateUUID( true ),
  185. '_csrftoken' => $token[0],
  186. 'username' => $this->username,
  187. 'guid' => $this->uuid,
  188. 'device_id' => $this->device_id,
  189. 'password' => $this->password,
  190. 'login_attempt_count' => '0'
  191. );
  192. $login = $this->request( 'accounts/login/', SignatureUtils::generateSignature( json_encode( $data ) ), true );
  193.  
  194. if ($login[1]['status'] == 'fail') {
  195. throw new Exception( $login[1]['message'] );
  196. }
  197.  
  198. $this->isLoggedIn = true;
  199. $this->username_id = $login[1]['logged_in_user']['pk'];
  200. $this->settings->set( 'username_id', $this->username_id );
  201. $this->rank_token = $this->username_id . '_' . $this->uuid;
  202. preg_match( '#Set-Cookie: csrftoken=([^;]+)#', $login[0], $match );
  203. $this->token = $match[1];
  204. $this->settings->set( 'token', $this->token );
  205. $this->syncFeatures( );
  206. $this->autoCompleteUserList( );
  207. $this->timelineFeed( );
  208. $this->getRankedRecipients( );
  209. $this->getRecentRecipients( );
  210. $this->megaphoneLog( );
  211. $this->getv2Inbox( );
  212. $this->getRecentActivity( );
  213. $this->getReelsTrayFeed( );
  214. $this->explore( );
  215. return $login[1];
  216. }
  217.  
  218. $check = $this->timelineFeed( );
  219.  
  220. if (isset( $check['message'] ) && ($check['message'] == 'login_required')) {
  221. return $this->login( true );
  222. }
  223.  
  224. $this->autoCompleteUserList( );
  225. $this->getReelsTrayFeed( );
  226. $this->getRankedRecipients( );
  227. $this->getRecentRecipients( );
  228. $this->megaphoneLog( );
  229. $this->getv2Inbox( );
  230. $this->getRecentActivity( );
  231. $this->explore( );
  232. return array( 'status' => 'ok' );
  233. }
  234.  
  235. public function syncFeatures()
  236. {
  237. $data = json_encode( array(
  238. '_uuid' => $this->uuid,
  239. '_uid' => $this->username_id,
  240. 'id' => $this->username_id,
  241. '_csrftoken' => $this->token,
  242. 'experiments' => Constants::EXPERIMENTS
  243. ) );
  244. return $this->request( 'qe/sync/', SignatureUtils::generateSignature( $data ) )[1];
  245. }
  246.  
  247. protected function autoCompleteUserList()
  248. {
  249. return $this->request( 'friendships/autocomplete_user_list/' )[1];
  250. }
  251.  
  252. protected function timelineFeed()
  253. {
  254. return $this->request( 'feed/timeline/' )[1];
  255. }
  256.  
  257. protected function megaphoneLog()
  258. {
  259. return $this->request( 'megaphone/log/' )[1];
  260. }
  261.  
  262. protected function expose()
  263. {
  264. $data = json_encode( array(
  265. '_uuid' => $this->uuid,
  266. '_uid' => $this->username_id,
  267. 'id' => $this->username_id,
  268. .....................................................................................................
  269. ...............................................................
  270. .....................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement