GRAYBYTE WORDPRESS FILE MANAGER8653

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/nioscentre.in/wp-content/plugins/airlift/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/nioscentre.in/wp-content/plugins/airlift//account.php
<?php

if (!defined('ABSPATH')) exit;
if (!class_exists('ALAccount')) :
	class ALAccount {
		public $settings;
		public $public;
		public $secret;
		public static $api_public_key = 'bvApiPublic';
		public static $accounts_list = 'bvAccountsList';
		private static $default_credential = array("475080eb82f6fe3436569494000f0b07" => "6a37a1ce51f0ea73c5667a5ee19be2ae");

		public function __construct($settings, $public, $secret) {
			$this->settings = $settings;
			$this->public = $public;
			$this->secret = $secret;
		}

		public static function find($settings, $public) {
			$accounts = self::allAccounts($settings);
			if (array_key_exists($public, $accounts) && isset($accounts[$public]['secret'])) {
				$secret = $accounts[$public]['secret'];
			}
			if (empty($secret) || (strlen($secret) < 32)) {
				if (!empty(self::$default_credential) && array_key_exists($public, self::$default_credential)
					&& strlen($public) >= 32) {
					$secret = self::$default_credential[$public];
					self::addAccount($settings, $public, $secret);
				} else {
					return null;
				}
			}
			return new self($settings, $public, $secret);
		}

		public static function update($settings, $allAccounts) {
			$settings->updateOption(self::$accounts_list, $allAccounts);
		}

		public static function randString($length) {
			$chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";

			$str = "";
			$size = strlen($chars);
			for( $i = 0; $i < $length; $i++ ) {
				$str .= $chars[rand(0, $size - 1)]; // phpcs:ignore WordPress.WP.AlternativeFunctions.rand_rand
			}
			return $str;
		}

		public static function sanitizeKey($key) {
			return preg_replace('/[^a-zA-Z0-9_\-]/', '', $key);
		}

		public static function apiPublicAccount($settings) {
			$pubkey = $settings->getOption(self::$api_public_key);
			return self::find($settings, $pubkey);
		}

		public static function updateApiPublicKey($settings, $pubkey) {
			$settings->updateOption(self::$api_public_key, $pubkey);
		}

		public static function getDefaultPublicKey() {
			return ALHelper::arrayKeyFirst(self::$default_credential);
		}

		public static function getApiPublicKey($settings) {
			return $settings->getOption(self::$api_public_key);
		}

		public static function getPlugName($settings) {
			$bvinfo = new ALInfo($settings);
			return $bvinfo->plugname;
		}

		public static function allAccounts($settings) {
			$accounts = $settings->getOption(self::$accounts_list);
			if (!is_array($accounts)) {
				$accounts = array();
			}
			return $accounts;
		}

		public static function accountsByPlugname($settings) {
			$accounts = self::allAccounts($settings);
			$accountsByPlugname = array();
			$plugname = self::getPlugName($settings);
			foreach ($accounts as $pubkey => $value) {
				if (array_key_exists($plugname, $value) && $value[$plugname] == 1) {
					$accountsByPlugname[$pubkey] = $value;
				}
			}
			return $accountsByPlugname;
		}

		public static function accountsByType($settings, $account_type) {
			$accounts = self::allAccounts($settings);
			$accounts_by_type = array();
			foreach ($accounts as $pubkey => $value) {
				if (array_key_exists('account_type', $value) && $value['account_type'] === $account_type) {
					$accounts_by_type[$pubkey] = $value;
				}
			}
			return $accounts_by_type;
		}

		public static function accountsByGid($settings, $account_gid) {
			$accounts = self::allAccounts($settings);
			$accounts_by_gid = array();
			foreach ($accounts as $pubkey => $value) {
				if (array_key_exists('account_gid', $value) && $value['account_gid'] === $account_gid) {
					$accounts_by_gid[$pubkey] = $value;
				}
			}
			return $accounts_by_gid;
		}

		public static function accountsByPattern($settings, $search_key, $search_pattern) {
			$accounts = self::allAccounts($settings);
			$accounts_by_pattern = array();
			foreach ($accounts as $pubkey => $value) {
				if (array_key_exists($search_key, $value) &&
						ALHelper::safePregMatch($search_pattern, $value[$search_key]) == 1) {
					$accounts_by_pattern[$pubkey] = $value;
				}
			}
			return $accounts_by_pattern;
		}

		public static function isConfigured($settings) {
			$accounts = self::accountsByPlugname($settings);
			return (sizeof($accounts) >= 1);
		}

		public static function setup($settings) {
			$bvinfo = new ALInfo($settings);
			$settings->updateOption($bvinfo->plug_redirect, 'yes');
			$settings->updateOption('bvActivateTime', time());
		}

		public function authenticatedUrl($method) {
			$bvinfo = new ALInfo($this->settings);
			$qstr = http_build_query($this->newAuthParams($bvinfo->version));
			return $bvinfo->appUrl().$method."?".$qstr;
		}

		public function newAuthParams($version) {
			$bvinfo = new ALInfo($this->settings);
			$args = array();
			$time = time();
			$sig = sha1($this->public.$this->secret.$time.$version);
			$args['sig'] = $sig;
			$args['bvTime'] = $time;
			$args['bvPublic'] = $this->public;
			$args['bvVersion'] = $version;
			$args['sha1'] = '1';
			$args['plugname'] = $bvinfo->plugname;
			return $args;
		}

		public static function addAccount($settings, $public, $secret) {
			$accounts = self::allAccounts($settings);
			if (!isset($public, $accounts)) {
				$accounts[$public] = array();
			}
			$accounts[$public]['secret'] = $secret;
			self::update($settings, $accounts);
		}

		public function info() {
			return array(
				"public" => substr($this->public, 0, 6)
			);
		}

		public function updateInfo($info) {
			$accounts = self::allAccounts($this->settings);
			$account_type = $info["account_type"];
			$pubkey = $info['pubkey'];
			if (!array_key_exists($pubkey, $accounts)) {
				$accounts[$pubkey] = array();
			}
			if (array_key_exists('secret', $info)) {
				$accounts[$pubkey]['secret'] = $info['secret'];
			}
			$accounts[$pubkey]['account_gid'] = $info['account_gid'];
			$accounts[$pubkey]['lastbackuptime'] = time();
			if (isset($info["speed_plugname"])) {
				$speed_plugname = $info["speed_plugname"];
				$accounts[$pubkey][$speed_plugname] = true;
			}
			if (isset($info["plugname"])) {
				$plugname = $info["plugname"];
				$accounts[$pubkey][$plugname] = true;
			}
			$accounts[$pubkey]['account_type'] = $account_type;
			$accounts[$pubkey]['url'] = $info['url'];
			$accounts[$pubkey]['email'] = $info['email'];
			self::update($this->settings, $accounts);
		}

		public static function remove($settings, $pubkey) {
			$accounts = self::allAccounts($settings);
			if (array_key_exists($pubkey, $accounts)) {
				unset($accounts[$pubkey]);
				self::update($settings, $accounts);
				return true;
			}
			return false;
		}

		public static function removeByAccountType($settings, $account_type) {
			$accounts = ALAccount::accountsByType($settings, $account_type);
			if (sizeof($accounts) >= 1) {
				foreach ($accounts as $pubkey => $value) {
					ALAccount::remove($settings, $pubkey);
				}
				return true;
			}
			return false;
		}

		public static function removeByAccountGid($settings, $account_gid) {
			$accounts = ALAccount::accountsByGid($settings, $account_gid);
			if (sizeof($accounts) >= 1) {
				foreach ($accounts as $pubkey => $value) {
					ALAccount::remove($settings, $pubkey);
				}
				return true;
			}
			return false;
		}

		public static function exists($settings, $pubkey) {
			$accounts = self::allAccounts($settings);
			return array_key_exists($pubkey, $accounts);
		}
	}
endif;

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 11 2025 13:53:58
giriqfky / giriqfky
0755
admin
--
March 28 2025 09:38:19
giriqfky / giriqfky
0755
buffer
--
March 28 2025 09:38:19
giriqfky / giriqfky
0755
callback
--
March 28 2025 09:38:19
giriqfky / giriqfky
0755
css
--
March 28 2025 09:38:19
giriqfky / giriqfky
0755
img
--
March 28 2025 09:38:19
giriqfky / giriqfky
0755
public_keys
--
March 28 2025 09:38:19
giriqfky / giriqfky
0755
account.php
7.211 KB
March 28 2025 09:38:19
giriqfky / giriqfky
0644
airlift.php
8.698 KB
March 28 2025 09:38:19
giriqfky / giriqfky
0644
helper.php
10.678 KB
March 28 2025 09:38:19
giriqfky / giriqfky
0644
info.php
7.069 KB
March 28 2025 09:38:19
giriqfky / giriqfky
0644
license.txt
19.463 KB
March 28 2025 09:38:19
giriqfky / giriqfky
0644
readme.txt
3.055 KB
March 28 2025 09:38:19
giriqfky / giriqfky
0644
recover.php
1.707 KB
March 28 2025 09:38:19
giriqfky / giriqfky
0644
wp_actions.php
2.738 KB
March 28 2025 09:38:19
giriqfky / giriqfky
0644
wp_admin.php
16.021 KB
March 28 2025 09:38:19
giriqfky / giriqfky
0644
wp_api.php
1.04 KB
March 28 2025 09:38:19
giriqfky / giriqfky
0644
wp_cache.php
2.909 KB
March 28 2025 09:38:19
giriqfky / giriqfky
0644
wp_db.php
6.104 KB
March 28 2025 09:38:19
giriqfky / giriqfky
0644
wp_dynsync.php
34.751 KB
March 28 2025 09:38:19
giriqfky / giriqfky
0644
wp_file_system.php
2.289 KB
March 28 2025 09:38:19
giriqfky / giriqfky
0644
wp_login_whitelabel.php
1.476 KB
March 28 2025 09:38:19
giriqfky / giriqfky
0644
wp_settings.php
2.062 KB
March 28 2025 09:38:19
giriqfky / giriqfky
0644
wp_site_info.php
2.319 KB
March 28 2025 09:38:19
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF