add joinscript + private key to edit in config.php

This commit is contained in:
nolanwhy 2023-02-05 14:18:07 +01:00
parent 53ac4f62c5
commit f9351eaa14
2 changed files with 80 additions and 0 deletions

View File

@ -13,6 +13,10 @@ if($devmode) {
error_reporting(E_ALL);
}
$gameSettings = [
"privatekey" => ""
];
$site = [
"url" => "http://".$_SERVER["HTTP_HOST"]
];

76
game/Join.php Normal file
View File

@ -0,0 +1,76 @@
<?php
require_once '../core/config.php';
header('content-type:application/json');
function sign($script, $key) {
$signature = "";
openssl_sign($script, $signature, $key, OPENSSL_ALGO_SHA1);
return base64_encode($signature);
}
$joinUser = [
"id" => rand(1,getrandmax()),
"username" => "User".rand(1,getrandmax()),
"mship" => "None"
];
$place = [
"id" => $_GET["gameid"]
];
$placeCreator = [
"id" => 6945435215,
"username" => "PlaceCreator",
];
$charapp = $site["url"]."/v1.1/avatar-fetch?userId=".$joinUser["id"]."&placeId=".$place["id"];
$server = [
"ip" => $_GET["ip"],
"port" => $_GET["port"]
];
$joinscript = [
"ClientPort" => 0,
"MachineAddress" => $server["ip"],
"ServerPort" => $server["port"],
"PingUrl" => "",
"PingInterval" => 20,
"UserName" => $joinUser["username"],
"SeleniumTestMode" => false,
"UserId" => $joinUser["id"],
"SuperSafeChat" => false,
"CharacterAppearance" => $charapp,
"ClientTicket" => "",
"GameId" => $place["id"],
"PlaceId" => $place["id"],
"MeasurementUrl" => "", // No telemetry here :)
"WaitingForCharacterGuid" => "26eb3e21-aa80-475b-a777-b43c3ea5f7d2",
"BaseUrl" => $site["url"]."/",
"ChatStyle" => "ClassicAndBubble",
"VendorId" => "0",
"ScreenShotInfo" => "",
"VideoInfo" => "",
"CreatorId" => $placeCreator["id"],
"CreatorTypeEnum" => "User",
"MembershipType" => $joinUser["mship"],
"AccountAge" => 3000000,
"CookieStoreFirstTimePlayKey" => "rbx_evt_ftp",
"CookieStoreFiveMinutePlayKey" => "rbx_evt_fmp",
"CookieStoreEnabled" => true,
"IsRobloxPlace" => false,
"GenerateTeleportJoin" => false,
"IsUnknownOrUnder13" => false,
"SessionId" => "",
"DataCenterId" => 0,
"UniverseId" => 3,
"BrowserTrackerId" => 0,
"UsePortraitMode" => false,
"FollowUserId" => 0,
"characterAppearanceId" => $joinUser["id"]
];
$data = json_encode($joinscript, JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK);
$signature = sign("\r\n" . $data, $gameSettings["privatekey"]);
exit("--rbxsig%". $signature . "%\r\n" . $data);
?>