From da9e11798d31b1d4fdc99707e545bf9c4ee92182 Mon Sep 17 00:00:00 2001 From: Mario <100047175+Mariopizza1@users.noreply.github.com> Date: Tue, 14 Feb 2023 09:02:18 +0200 Subject: [PATCH 1/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1c2aeea..99ac80a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ A Bootstrap based ROBLOX revival website. - [x] Make Create assets/game page
- [x] Make Catalog page (functional)
- [x] Make Credits page
-- [ ] Make Placelauncher.ashx require a token for joining then proceed to start a game on a gameserver with soap +- [x] Make Placelauncher.ashx require a token for joining then proceed to start a game on a gameserver with soap - [ ] Make renders with a soap request to rcc - [x] Make Admin panel and make it only accessible to admin users (show stuff like how many games are running cpu usage on the webserver how many users are online that kind of stuff) - [ ] \(Optional) Add Recaptcha (https://developers.google.com/recaptcha/old/docs/php, ask mario to make a public key if u want to do this feature) (I dont see the point -qzip) From 8273e8113ebe1d4cdbf074c15b9a570110cf385f Mon Sep 17 00:00:00 2001 From: Mario <100047175+Mariopizza1@users.noreply.github.com> Date: Tue, 14 Feb 2023 09:03:34 +0200 Subject: [PATCH 2/8] lemme show u how to scratch it --- place.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/place.php b/place.php index 43e6b54..f5b09e0 100644 --- a/place.php +++ b/place.php @@ -179,7 +179,7 @@ function play() { data:{"placeid":action}, success: function(response){ var token = response; - window.location = "grublox-player://1+launchmode:play+gameinfo:" + token + "+placelauncherurl:http://sierraf.tk/game/PlaceLauncher.ashx"; + window.location = "grublox-player://1+launchmode:play+gameinfo:" + token + "+placelauncherurl:http://sierraf.tk/game/PlaceLauncher.ashx?token=" + token; } }); } From 1d9e2df7be1512bed7025fe37bb3ae10c77e45e6 Mon Sep 17 00:00:00 2001 From: Mario <100047175+Mariopizza1@users.noreply.github.com> Date: Tue, 14 Feb 2023 09:07:30 +0200 Subject: [PATCH 3/8] Update PlaceLauncher.php --- game/PlaceLauncher.php | 1 + 1 file changed, 1 insertion(+) diff --git a/game/PlaceLauncher.php b/game/PlaceLauncher.php index b924168..26cb413 100644 --- a/game/PlaceLauncher.php +++ b/game/PlaceLauncher.php @@ -84,6 +84,7 @@ if ($momentoftruth == 1) { $okbrahh = $checkport->fetchColumn(); if ($okbrahh == 1) { $port = rand(5000,5999); // great heavens if this ever happens report to me + die("How did we get here?"); } else if ($okbrahh == 0) { $RCCServiceSoap = new Roblox\Grid\Rcc\RCCServiceSoap("127.0.0.1", 64989); $script = ' From c25cf66bb51d126109b4ae73338971b957fc4609 Mon Sep 17 00:00:00 2001 From: Mario <100047175+Mariopizza1@users.noreply.github.com> Date: Tue, 14 Feb 2023 09:14:56 +0200 Subject: [PATCH 4/8] helppppppp --- game/PlaceLauncher.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/game/PlaceLauncher.php b/game/PlaceLauncher.php index 26cb413..9f45626 100644 --- a/game/PlaceLauncher.php +++ b/game/PlaceLauncher.php @@ -43,8 +43,9 @@ if ($momentoftruth == 1) { $checkifjobalreadyexists->execute(); $okcheck = $checkifjobalreadyexists->fetchColumn(); if ($okcheck == 1) { - $getjobforalready = $con->prepare('SELECT jobid FROM jobs WHERE placeid=:placeid'); + $getjobforalready = $con->prepare('SELECT jobid FROM jobs WHERE placeid=:placeid AND isonline=:isonline'); $getjobforalready->bindParam(':placeid', $placeid); + $getjobforalready->bindParam(':isonline', $helppdo); $getjobforalready->execute(); $china2 = $getjobforalready->fetch(PDO::FETCH_BOTH); $jobid = $china2['jobid']; From fdf5e7b23b8a9f22ded20b8196e5d74fdfe50e33 Mon Sep 17 00:00:00 2001 From: Mario <100047175+Mariopizza1@users.noreply.github.com> Date: Tue, 14 Feb 2023 09:54:25 +0200 Subject: [PATCH 5/8] OHHHH SHITTTT --- game/PlaceLauncher.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/PlaceLauncher.php b/game/PlaceLauncher.php index 9f45626..09f8fe6 100644 --- a/game/PlaceLauncher.php +++ b/game/PlaceLauncher.php @@ -59,7 +59,7 @@ if ($momentoftruth == 1) { ]; echo json_encode($response); } else if ($okcheck == 0) { - $hahatroll = $con->prepare('UPDATE tokens SET passedplacelauncher = 0 WHERE token=:token'); + $hahatroll = $con->prepare('UPDATE tokens SET passedplacelauncher = 1 WHERE token=:token'); $hahatroll->bindParam(':token', $token); $hahatroll->execute(); function generateRandomJobId() { @@ -79,7 +79,7 @@ if ($momentoftruth == 1) { $jobid = generateRandomJobId(); $port = rand(5000,5999); $checkport = $con->prepare('SELECT COUNT(*) FROM tokens WHERE token=:token AND passedplacelauncher=:passed'); - $chechport->bindParam(':token', $token); + $checkport->bindParam(':token', $token); $checkport->bindParam(':passed', $okbruh); $checkport->execute(); $okbrahh = $checkport->fetchColumn(); From f00dbe6530f14efe06dc7eb565c89d15ec08e351 Mon Sep 17 00:00:00 2001 From: Mario <100047175+Mariopizza1@users.noreply.github.com> Date: Tue, 14 Feb 2023 10:06:24 +0200 Subject: [PATCH 6/8] Update PlaceLauncher.php --- game/PlaceLauncher.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/game/PlaceLauncher.php b/game/PlaceLauncher.php index 09f8fe6..b8f5c90 100644 --- a/game/PlaceLauncher.php +++ b/game/PlaceLauncher.php @@ -43,6 +43,11 @@ if ($momentoftruth == 1) { $checkifjobalreadyexists->execute(); $okcheck = $checkifjobalreadyexists->fetchColumn(); if ($okcheck == 1) { + $passedplacelauncher = '1'; + $hahatroll = $con->prepare('UPDATE tokens SET passedplacelauncher = :passedplacelauncher WHERE token=:token'); + $hahatroll->bindParam(':passedplacelauncher', $passedplacelauncher); + $hahatroll->bindParam(':token', $token); + $hahatroll->execute(); $getjobforalready = $con->prepare('SELECT jobid FROM jobs WHERE placeid=:placeid AND isonline=:isonline'); $getjobforalready->bindParam(':placeid', $placeid); $getjobforalready->bindParam(':isonline', $helppdo); @@ -52,15 +57,17 @@ if ($momentoftruth == 1) { $response = [ "jobId" => $jobid, "status" => $status, - "joinScriptUrl" => "http://". $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid, - "authenticationUrl" => "http://". $soapcfg['url'] ."/Login/Negotiate.ashx", + "joinScriptUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid, + "authenticationUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/Login/Negotiate.ashx", "authenticationTicket" => $token, "message" => $allstatus[$status] ]; echo json_encode($response); } else if ($okcheck == 0) { - $hahatroll = $con->prepare('UPDATE tokens SET passedplacelauncher = 1 WHERE token=:token'); - $hahatroll->bindParam(':token', $token); + $passedplacelauncher = '1'; + $hahatroll = $con->prepare('UPDATE tokens SET passedplacelauncher = :passedplacelauncher WHERE token=:token'); + $hahatroll->bindParam(':passedplacelauncher', $passedplacelauncher); + $hahatroll->bindParam(':token', $token); $hahatroll->execute(); function generateRandomJobId() { $chars = '0123456789abcdefghijklmnopqrstuvwxyz'; @@ -207,8 +214,8 @@ game:GetService("RunService"):Run() $response = [ "jobId" => $jobid, "status" => $status, - "joinScriptUrl" => "http://". $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid, - "authenticationUrl" => "http://". $soapcfg['url'] ."/Login/Negotiate.ashx", + "joinScriptUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/game/join?token=". $token ."&jobid=". $jobid, + "authenticationUrl" => $soapcfg["usehttps"] . $soapcfg['url'] ."/Login/Negotiate.ashx", "authenticationTicket" => $token, "message" => $allstatus[$status] ]; From 7bcb97308715edd4bb31aad536e569e6eab07376 Mon Sep 17 00:00:00 2001 From: Mario <100047175+Mariopizza1@users.noreply.github.com> Date: Tue, 14 Feb 2023 10:06:48 +0200 Subject: [PATCH 7/8] Update config.php --- core/config.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/core/config.php b/core/config.php index 9c01cc2..24ac859 100644 --- a/core/config.php +++ b/core/config.php @@ -35,11 +35,18 @@ MIICXQIBAAKBgQDhO7uhMz3jBLoSB/SHWhnE5tVxn7P6BlirPVrZEWVUxjyC5ybhZpyjL/r6KBlvhgyn $soapIp = $AvailableGameservers[array_rand($AvailableGameservers,1)]; $soapcfg = [ - "ip" => $soapIp, + "ip" => $AvailableGameservers[1], "port" => 64989, - "url" => "sierraf.tk" + "url" => "sierraf.tk", + "usehttps" => 'false' ]; +if ($soapcfg["usehttps"] == 'true') { + $soapcfg["usehttps"] = 'https://'; +} else if ($soapcfg["usehttps"] == 'false') { + $soapcfg["usehttps"] = 'http://'; +} + $site = [ "url" => "https://".$_SERVER["HTTP_HOST"] ]; From 302e227e6ee2cce0a6f088ed3cea89820007e2e6 Mon Sep 17 00:00:00 2001 From: Mario <100047175+Mariopizza1@users.noreply.github.com> Date: Tue, 14 Feb 2023 22:48:07 +0200 Subject: [PATCH 8/8] Update Join.php --- game/Join.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/Join.php b/game/Join.php index 3eb103e..5ee86fd 100644 --- a/game/Join.php +++ b/game/Join.php @@ -74,7 +74,7 @@ if ($anothermomentoftruth == 1 && $anotheranothermomentoftruth == 1) { "SuperSafeChat" => false, "CharacterAppearance" => "", "ClientTicket" => $authticket, - "GameId" => $placeid, + "GameId" => $jobid, "PlaceId" => $placeid, "MeasurementUrl" => "", "WaitingForCharacterGuid" => "26eb3e21-aa80-475b-a777-b43c3ea5f7d2",