PHP 8.2.31
Preview: recover.php Size: 1.71 KB
//proc/self/root/home/nshryvcy/blissfulnepal.com/wp-content/plugins/airlift/recover.php

<?php
if (!defined('ABSPATH')) exit;
if (!class_exists('ALRecover')) :
	class ALRecover {
		public static $default_secret_key = 'bv_default_secret_key';

		public static function defaultSecret($settings) {
			$secret = self::getDefaultSecret($settings);
			if (empty($secret)) {
				$secret = ALRecover::refreshDefaultSecret($settings);
			}
			return $secret;
		}

		public static function refreshDefaultSecret($settings) {
			$key_details = array();
			$key_details["key"] = ALAccount::randString(32);
			$key_details["expires_at"] = time() + (24 * 60 * 60);

			$settings->updateOption(self::$default_secret_key, $key_details);

			return $key_details["key"];
		}


		public static function deleteDefaultSecret($settings) {
			$settings->deleteOption(self::$default_secret_key);
		}

		public static function getDefaultSecret($settings) {
			$key_details = $settings->getOption(self::$default_secret_key);

			if (is_array($key_details) && $key_details["expires_at"] > time()) {
				return $key_details["key"];
			}

			return null;
		}

		public static function getSecretStatus($settings) {
			$key_details = $settings->getOption(self::$default_secret_key);
			$status = 'ACTIVE';
			if (!is_array($key_details)) {
				  $status = 'DELETED';
			} elseif ($key_details["expires_at"] <= time()) {
				  $status = 'EXPIRED';
			}

			return $status;
		}

		public static function validate($key) {
			return $key && strlen($key) >= 32;
		}

		public static function find($settings, $pubkey) {
			if (!self::validate($pubkey)) {
				return null;
			}

			$secret = self::getDefaultSecret($settings);
			if (!self::validate($secret)) {
				return null;
			}

			$account = new ALAccount($settings, $pubkey, $secret);
			return $account;
		}
	}
endif;

Directory Contents

Dirs: 7 × Files: 17

Name Size Perms Modified Actions
admin DIR
- drwxr-xr-x 2026-04-02 01:31:44
Edit Download
buffer DIR
- drwxr-xr-x 2026-04-02 01:31:44
Edit Download
callback DIR
- drwxr-xr-x 2026-04-02 01:31:45
Edit Download
css DIR
- drwxr-xr-x 2026-04-02 01:31:45
Edit Download
img DIR
- drwxr-xr-x 2026-04-02 01:31:44
Edit Download
js DIR
- drwxr-xr-x 2026-04-02 01:31:45
Edit Download
- drwxr-xr-x 2026-04-02 01:31:44
Edit Download
7.14 KB lrw-r--r-- 2026-04-02 01:31:44
Edit Download
8.93 KB lrw-r--r-- 2026-04-02 01:31:44
Edit Download
10.68 KB lrw-r--r-- 2026-04-02 01:31:44
Edit Download
7.07 KB lrw-r--r-- 2026-04-02 01:31:44
Edit Download
19.46 KB lrw-r--r-- 2026-04-02 01:31:44
Edit Download
5.19 KB lrw-r--r-- 2026-04-02 01:31:44
Edit Download
1.71 KB lrw-r--r-- 2026-04-02 01:31:45
Edit Download
2.56 KB lrw-r--r-- 2026-04-02 01:31:44
Edit Download
16.15 KB lrw-r--r-- 2026-04-02 01:31:44
Edit Download
1.04 KB lrw-r--r-- 2026-04-02 01:31:44
Edit Download
2.91 KB lrw-r--r-- 2026-04-02 01:31:44
Edit Download
6.10 KB lrw-r--r-- 2026-04-02 01:31:44
Edit Download
34.64 KB lrw-r--r-- 2026-04-02 01:31:44
Edit Download
2.29 KB lrw-r--r-- 2026-04-02 01:31:44
Edit Download
1.57 KB lrw-r--r-- 2026-04-02 01:31:44
Edit Download
2.06 KB lrw-r--r-- 2026-04-02 01:31:45
Edit Download
2.32 KB lrw-r--r-- 2026-04-02 01:31:45
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).