$71 GRAYBYTE WORDPRESS FILE MANAGER $75

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/var/softaculous/firefly/

HOME
Current File : /var/softaculous/firefly//update_keys.php
<?php

global $key, $error;

$key = base64_decode('[[APP_KEY]]');

//Required to autoload the namespaces
require_once '../vendor/autoload.php';

use Ramsey\Uuid\Uuid;
use phpseclib3\Crypt\RSA;

$uuid5 = (string)Uuid::uuid5(Uuid::NAMESPACE_URL, 'firefly-iii.org');

//This is to generate public and private key pairs(of 4096 bits) using phpseclib's RSA class's createKey() function and store the keys in database

$keys = array();

$keys = RSA::createKey(4096);

$public_key = (string)$keys->getPublicKey();

$private_key = (string)$keys;

echo '<private_key>'.$private_key.'</private_key>';
echo '<public_key>'.$public_key.'</public_key>';

//Encrypting the keys
$uuid5_enc =  json_encode($uuid5);
$private_key_enc =  json_encode(__encrypt($private_key));
$public_key_enc =  json_encode(__encrypt($public_key));

echo '<installation_id>'.$uuid5_enc.'</installation_id>';
echo '<private_key_enc>'.$private_key_enc.'</private_key_enc>';
echo '<public_key_enc>'.$public_key_enc.'</public_key_enc>';

function __encrypt($value, $serialize = true)
{
	global $key, $error;
	$cipher = 'AES-256-CBC';
	//$this->cipher
	$iv = random_bytes(openssl_cipher_iv_length($cipher));

	// First we will encrypt the value using OpenSSL. After this is encrypted we
	// will proceed to calculating a MAC for the encrypted value so that this
	// value can be verified later as not having been changed by the users.
	$value = openssl_encrypt(
		$serialize ? serialize($value) : $value,
		$cipher, $key, 0, $iv
	);

	if ($value === false) {
		$error[] = 'Could not encrypt the data.';
	}

	// Once we get the encrypted value we'll go ahead and base64_encode the input
	// vector and create the MAC for the encrypted value so we can then verify
	// its authenticity. Then, we'll JSON the data into the "payload" array.
	$mac = __hash($iv = base64_encode($iv), $value);

	$json = json_encode(compact('iv', 'value', 'mac'));

	if (json_last_error() !== JSON_ERROR_NONE) {
		$error[] = 'Could not encrypt the data.';
	}

	return base64_encode($json);
}

function __hash($iv, $value)
{
	global $key;
	return hash_hmac('sha256', $iv.$value, $key);
}

@unlink('update_keys.php');

?>


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
5 Apr 2026 1.55 AM
root / root
0755
images
--
25 Mar 2026 1.55 AM
root / root
0755
php53
--
25 Mar 2026 1.55 AM
root / root
0755
php56
--
25 Mar 2026 1.55 AM
root / root
0755
php71
--
25 Mar 2026 1.55 AM
root / root
0755
php81
--
25 Mar 2026 1.55 AM
root / root
0755
php82
--
25 Mar 2026 1.55 AM
root / root
0755
.env
10.906 KB
23 Mar 2026 8.55 AM
root / root
0644
.htaccess
0.362 KB
20 Jun 2025 11.02 AM
root / root
0644
changelog.txt
6.659 KB
24 Mar 2026 11.14 AM
root / root
0644
clone.php
7.902 KB
24 Mar 2026 12.30 PM
root / root
0644
edit.php
4.447 KB
24 Mar 2026 12.30 PM
root / root
0644
edit.xml
0.437 KB
23 Dec 2021 11.54 AM
root / root
0644
extend.php
9.988 KB
24 Mar 2026 12.30 PM
root / root
0644
fileindex.php
0.325 KB
20 Jan 2026 8.33 AM
root / root
0644
firefly.sql
99.207 KB
24 Mar 2026 11.14 AM
root / root
0644
firefly.zip
39.8 MB
24 Mar 2026 11.14 AM
root / root
0644
import.php
2.999 KB
24 Mar 2026 12.30 PM
root / root
0644
info.xml
4.109 KB
24 Mar 2026 11.14 AM
root / root
0644
install.js
0.902 KB
23 Dec 2021 11.54 AM
root / root
0644
install.php
6.426 KB
24 Mar 2026 12.30 PM
root / root
0644
install.xml
1.497 KB
23 Dec 2021 11.54 AM
root / root
0644
md5
4.264 KB
24 Mar 2026 12.30 PM
root / root
0644
notes.txt
1.603 KB
4 Feb 2025 7.42 AM
root / root
0644
oauth-private.key
0.016 KB
23 Dec 2021 11.54 AM
root / root
0644
oauth-public.key
0.015 KB
23 Dec 2021 11.54 AM
root / root
0644
update_keys.php
2.103 KB
18 Jul 2025 9.45 AM
root / root
0644
update_pass.php
0.504 KB
23 Dec 2021 11.54 AM
root / root
0644
upgrade.php
6.672 KB
24 Mar 2026 12.30 PM
root / root
0644
upgrade.xml
0.604 KB
13 Oct 2025 8.03 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF