Merge branches 'main' and 'main' of https://github.com/grublox/grublox-site

This commit is contained in:
inventfvl 2023-05-03 19:24:48 +12:00
commit fde6008247
2 changed files with 31 additions and 1 deletions

View File

@ -12,6 +12,36 @@ require dirname(__DIR__).'/Assemblies/Roblox/Grid/Rcc/Status.php';
$RCCServiceSoap = new Roblox\Grid\Rcc\RCCServiceSoap($soapcfg["ip"],$soapcfg["port"]);
// end soap
/**
* Name: Script Signer
* Description: This function returns the "rbxsig" signature and the script.
* Parameters: [
* "script" => "The script to sign",
* "privatekey" => "Private key used to sign"
* ]
*/
function scriptsign($script, $privatekey) {
$signature;
$script = "\n".$script;
openssl_sign($script, $signature, $privatekey, OPENSSL_ALGO_SHA1);
return "--rbxsig" . sprintf("%%%s%%%s", base64_encode($signature), $script);
}
/**
* Name: Array Signer
* Description: This function returns the "rbxsig" signature and the array.
* Parameters: [
* "array" => "The array to sign",
* "privatekey" => "Private key used to sign"
* ]
*/
function arraysign($array, $privatekey) {
$signature;
$jsonarray = "\n".json_encode($array);
openssl_sign("\r\n" . $jsonarray, $signature, $privatekey, OPENSSL_ALGO_SHA1);
return "--rbxsig" . sprintf("%%%s%%%s", base64_encode($signature), $jsonarray);
}
function discordmsg($msg, $webhook) {
if($webhook != "") {
$ch = curl_init( $webhook );

View File

@ -90,4 +90,4 @@ try {
unset($sql);
} catch (PDOException $e) {
die("Connection failed: " . $e->getMessage());
}
}