diff --git a/.DS_Store b/.DS_Store index 02ae1b2..18a756b 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.gitignore b/.gitignore index edc77c8..1bc75e4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ /node_modules /public/hot /public/storage +/resources/privkey/PrivKey.pem +/public/GameRBLX/PrivKey.pem +/public/asset/PrivKey.pem /storage/*.key /vendor .env @@ -14,4 +17,4 @@ yarn-error.log /.idea /.vscode public/.DS_Store -maintenance/.DS_Store +maintenance/.DS_Store \ No newline at end of file diff --git a/app/Http/Controllers/ClientController.php b/app/Http/Controllers/ClientController.php index bd0bc4d..f4108e4 100644 --- a/app/Http/Controllers/ClientController.php +++ b/app/Http/Controllers/ClientController.php @@ -100,4 +100,9 @@ class ClientController extends Controller { return view('client.CharacterFetch'); } + + public function assetIndex() + { + return view('client.assetIndex'); + } } diff --git a/maintenance/.DS_Store b/maintenance/.DS_Store index 3ab5ffd..109cc60 100644 Binary files a/maintenance/.DS_Store and b/maintenance/.DS_Store differ diff --git a/public/GameRBLX/PrivKey.pem b/public/GameRBLX/PrivKey.pem deleted file mode 100644 index 5e1a390..0000000 --- a/public/GameRBLX/PrivKey.pem +++ /dev/null @@ -1,3 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXQIBAAKBgQDAWrd/TwGJULsVRo06rCpznNmW4zLJK6LwkfTvG3wURFFBj9E9zuaKAOzHVRrHsWKJhq2BxSUze7OClgzgzFLRQHhRQFKn/skLPrV85bFakoK/dnt9h/Jyn2cD2A8Za6q90O3h9FSy9mLvCN07g07IXtauYZfOXvqyqOn4rAeUJQIDAQABAoGBAISbxddZo0iERIW1XtXtLVMI9iUEutVfZPSO2xogi5j5RD97o5gF1H+dhZ8iN9UloDYJiAJn5G6qwCWtxnEPy6NO4lMDgFMQtlpIIW9mafZ7m+AueYJtgO5elLUnFbOA39OcvFUleL9ded42yuB2wfsGdKl85+mHvn8j4zTmT0+9AkEA3H7NBFhIVf3Vj6iLXwPmamhou8T8b+HSXop0krrP/jDw/wHbl0DEJbQv+ypYdoXJo8XS2Hs39z20pCEsUo2/NwJBAN9T5aWXmVnymbdNUCDMjjer2d6Ey9ARyFgB07xHSod+HWlSCES8pcWwZZrP/I4cf2CEiAInfgak0kNNWLOWnYMCQDJEoj7UVaFtHiwDM8r0m6o0pXPxY8+p/wjYrdzpxBNiWv74EHT6Kf2ih7HOJJ7Yv3Cb4AbEiKzQH4evnGgxsp8CQQDRPK+ad/DLn0p5vMvoDv7oFfCoVM8IAMEuA3g3nKutSnGP7bWlgQHnuB9Z7qf3FagZ69HqAspGu0HsoJkMmX61AkAO5wTd+rja0MP7rT5xNVYBALtdYLWowBov4NCN7BVDkd0JzeTjMtDerirvEDuzDBrbyFtKV5rZjZpuotFc+5/t ------END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/public/asset/.DS_Store b/public/asset/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/public/asset/.DS_Store differ diff --git a/public/asset/PrivKey.pem b/public/asset/PrivKey.pem deleted file mode 100644 index 5e1a390..0000000 --- a/public/asset/PrivKey.pem +++ /dev/null @@ -1,3 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXQIBAAKBgQDAWrd/TwGJULsVRo06rCpznNmW4zLJK6LwkfTvG3wURFFBj9E9zuaKAOzHVRrHsWKJhq2BxSUze7OClgzgzFLRQHhRQFKn/skLPrV85bFakoK/dnt9h/Jyn2cD2A8Za6q90O3h9FSy9mLvCN07g07IXtauYZfOXvqyqOn4rAeUJQIDAQABAoGBAISbxddZo0iERIW1XtXtLVMI9iUEutVfZPSO2xogi5j5RD97o5gF1H+dhZ8iN9UloDYJiAJn5G6qwCWtxnEPy6NO4lMDgFMQtlpIIW9mafZ7m+AueYJtgO5elLUnFbOA39OcvFUleL9ded42yuB2wfsGdKl85+mHvn8j4zTmT0+9AkEA3H7NBFhIVf3Vj6iLXwPmamhou8T8b+HSXop0krrP/jDw/wHbl0DEJbQv+ypYdoXJo8XS2Hs39z20pCEsUo2/NwJBAN9T5aWXmVnymbdNUCDMjjer2d6Ey9ARyFgB07xHSod+HWlSCES8pcWwZZrP/I4cf2CEiAInfgak0kNNWLOWnYMCQDJEoj7UVaFtHiwDM8r0m6o0pXPxY8+p/wjYrdzpxBNiWv74EHT6Kf2ih7HOJJ7Yv3Cb4AbEiKzQH4evnGgxsp8CQQDRPK+ad/DLn0p5vMvoDv7oFfCoVM8IAMEuA3g3nKutSnGP7bWlgQHnuB9Z7qf3FagZ69HqAspGu0HsoJkMmX61AkAO5wTd+rja0MP7rT5xNVYBALtdYLWowBov4NCN7BVDkd0JzeTjMtDerirvEDuzDBrbyFtKV5rZjZpuotFc+5/t ------END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/public/asset/index.php b/resources/views/client/assetIndex.blade.php similarity index 79% rename from public/asset/index.php rename to resources/views/client/assetIndex.blade.php index 35ff81d..270c8fa 100644 --- a/public/asset/index.php +++ b/resources/views/client/assetIndex.blade.php @@ -1,69 +1,67 @@ - "Error handling your request."]))); -$version = isset($_GET["version"]) ? filter_var($_GET["version"], FILTER_SANITIZE_NUMBER_INT, FILTER_NULL_ON_FAILURE) : -1; - - -if (file_exists($_SERVER["DOCUMENT_ROOT"] . "/asset/" . $id)){ - $file = file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/asset/" . $id); - if (isset($_GET["sign"]) == true){ - sign($file); - }else if($id == 1){ - sign($file); - }else if($id == 2){ - sign($file); - }else if($id == 3){ - sign($file); - }else if($id == 4){ - sign($file); - }else if($id == 5){ - sign($file); - }else if($id == 7){ - sign($file); - }else if($id == 6){ - sign($file); - }else if($id == 8){ - sign($file); - }else if($id == 9){ - sign($file); - }else if($id == 10){ - sign($file); - }else if($id == 11){ - sign($file); - }else if($id == 12){ - sign($file); - }else if($id == 13){ - sign($file); - }else if($id == 14){ - sign($file); - }else if($id == 15){ - sign($file); - }else if($id == 16){ - sign($file); - }else if($id == 17){ - sign($file); - }else if($id == 18){ - sign($file); - }else if($id == 19){ - sign($file); - }else if($id == 20){ - sign($file); - }else if ($id == 200) { - sign($file); - }else if ($id == 201) { - sign($file); - }else{ - echo $file; - } -}else{ - header("Location: https://assetdelivery.roblox.com/v1/asset/?id=$id&version=$version"); - die(); -} -?> \ No newline at end of file +@php +ob_start(); +function sign($data) { + $PrivKey = file_get_contents("../../privkey/PrivKey.pem"); + openssl_sign($data, $signature, $PrivKey, OPENSSL_ALGO_SHA1); + echo sprintf("%%%s%%%s", base64_encode($signature), $data); +} +ini_set('user_agent', 'Roblox/WinInet'); // required for some audios + +$id = (int)($_GET["id"] ?? die(json_encode(["message" => "Invalid ID!"]))); +$version = isset($_GET["version"]) ? filter_var($_GET["version"], FILTER_SANITIZE_NUMBER_INT, FILTER_NULL_ON_FAILURE) : -1; +if (file_exists("../../../public/" . "/asset/" . $id)){ + $file = file_get_contents("../../../public/" . "/asset/" . $id); + if (isset($_GET["sign"]) == true){ + sign($file); + }else if($id == 1){ + sign($file); + }else if($id == 2){ + sign($file); + }else if($id == 3){ + sign($file); + }else if($id == 4){ + sign($file); + }else if($id == 5){ + sign($file); + }else if($id == 7){ + sign($file); + }else if($id == 6){ + sign($file); + }else if($id == 8){ + sign($file); + }else if($id == 9){ + sign($file); + }else if($id == 10){ + sign($file); + }else if($id == 11){ + sign($file); + }else if($id == 12){ + sign($file); + }else if($id == 13){ + sign($file); + }else if($id == 14){ + sign($file); + }else if($id == 15){ + sign($file); + }else if($id == 16){ + sign($file); + }else if($id == 17){ + sign($file); + }else if($id == 18){ + sign($file); + }else if($id == 19){ + sign($file); + }else if($id == 20){ + sign($file); + }else if ($id == 200) { + sign($file); + }else if ($id == 201) { + sign($file); + }else{ + echo $file; + } +}else{ + header("Location: https://assetdelivery.roblox.com/v1/asset/?id=$id&version=$version"); + die(); +} +@endphp \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 1b2b543..2def1b8 100644 --- a/routes/web.php +++ b/routes/web.php @@ -108,4 +108,5 @@ Route::get('/UI/Save.aspx', [App\Http\Controllers\ClientController::class, 'mode Route::get('/Game/Tools/ThumbnailAsset.ashx', [App\Http\Controllers\ClientController::class, 'stampertools'])->name('stampertools'); Route::get('/Game/edit.ashx', [App\Http\Controllers\ClientController::class, 'edit'])->name('edit'); Route::get('/Asset/BodyColors.ashx', [App\Http\Controllers\ClientController::class, 'bodycolors'])->name('bodycolors'); -Route::get('/Asset/CharacterFetch.ashx', [App\Http\Controllers\ClientController::class, 'characterfetch'])->name('characterfetch'); \ No newline at end of file +Route::get('/Asset/CharacterFetch.ashx', [App\Http\Controllers\ClientController::class, 'characterfetch'])->name('characterfetch'); +Route::get('/asset', [App\Http\Controllers\ClientController::class, 'assetIndex'])->name('assetIndex'); \ No newline at end of file