<?php if (!defined('ABSPATH')) exit; if (!class_exists('MCRecover')) : class MCRecover { public static $default_secret_key = 'bv_default_secret_key'; public static function defaultSecret($settings) { $secret = self::getDefaultSecret($settings); if (empty($secret)) { $secret = MCRecover::refreshDefaultSecret($settings); } return $secret; } public static function refreshDefaultSecret($settings) { $key_details = array(); $key_details["key"] = MCAccount::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 MCAccount($settings, $pubkey, $secret); return $account; } } endif;
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
admin | Folder | 0755 |
|
|
callback | Folder | 0755 |
|
|
css | Folder | 0755 |
|
|
form_testing | Folder | 0755 |
|
|
img | Folder | 0755 |
|
|
php_error_monitoring | Folder | 0755 |
|
|
protect | Folder | 0755 |
|
|
public_keys | Folder | 0755 |
|
|
wp_2fa | Folder | 0755 |
|
|
account.php | File | 7.14 KB | 0644 |
|
helper.php | File | 10.68 KB | 0644 |
|
info.php | File | 7.66 KB | 0644 |
|
license.txt | File | 19.46 KB | 0644 |
|
malcare.php | File | 8.49 KB | 0644 |
|
readme.txt | File | 32.06 KB | 0644 |
|
recover.php | File | 1.71 KB | 0644 |
|
wp_actions.php | File | 2.92 KB | 0644 |
|
wp_actlog.php | File | 17.52 KB | 0644 |
|
wp_admin.php | File | 12.67 KB | 0644 |
|
wp_api.php | File | 1.04 KB | 0644 |
|
wp_cli.php | File | 5.6 KB | 0644 |
|
wp_db.php | File | 6.1 KB | 0644 |
|
wp_dynsync.php | File | 34.75 KB | 0644 |
|
wp_file_system.php | File | 2.29 KB | 0644 |
|
wp_login_whitelabel.php | File | 1.48 KB | 0644 |
|
wp_settings.php | File | 2.06 KB | 0644 |
|
wp_site_info.php | File | 2.4 KB | 0644 |
|