From 41b7efe9f3a7372f2a0e8714ad4346214466b0f6 Mon Sep 17 00:00:00 2001 From: olebeck <31539311+olebeck@users.noreply.github.com> Date: Thu, 2 May 2024 13:20:26 +0200 Subject: [PATCH] add pkg2zip --- .gitmodules | 3 +++ common.php | 3 ++- libary.php | 49 ++++++++++++++++++++++++++++--------------------- php_pkg | 1 + pkg2zip.php | 27 +++++++++++++++++++++++++++ 5 files changed, 61 insertions(+), 22 deletions(-) create mode 100644 .gitmodules create mode 160000 php_pkg create mode 100644 pkg2zip.php diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9c2c5ff --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "php_pkg"] + path = php_pkg + url = https://silica.codes/olebeck/php_pkg diff --git a/common.php b/common.php index adabea6..e53c942 100755 --- a/common.php +++ b/common.php @@ -29,7 +29,7 @@ function update_rifs() } } update_rifs(); - +/* if(strcmp($_SERVER['HTTP_HOST'],"psmreborn.com") !== 0) { if(strcmp($_SERVER['HTTP_HOST'],"psm.cbps.xyz") !== 0) @@ -38,6 +38,7 @@ if(strcmp($_SERVER['HTTP_HOST'],"psmreborn.com") !== 0) die("\r\n\r\n403 Forbidden\r\n\r\n

Forbidden

\r\n

You don't have permission to access this resource.

\r\n
\r\n
Apache/2.4.41 (Ubuntu) Server at ".$_SERVER['HTTP_HOST']." Port 80
\r\n"); } } +*/ function printGenreList(SimpleXMLElement $xml) { diff --git a/libary.php b/libary.php index 708a313..a9a5113 100755 --- a/libary.php +++ b/libary.php @@ -3,6 +3,17 @@ include("header.php"); ?> $rif_dict, + "window" => 10, + )); + $rifz = base64_decode($zrif); + $rif = inflate_add($ctx, $rifz); + return bin2hex(substr($rif, 0x120, 0x10)); + } + function getSdkVersion(SimpleXMLElement $xml) { if(isset($xml->attributes()->sdk_version)) { @@ -66,9 +77,6 @@ include("header.php"); $zrifinfo = getZRIF($game); $zrifPendingInfo = getPendingZRIF($game); $pkgSony = getPKG($game); - $simulatorZip = "decrypted-files/".$game.".zip"; - - $verXML = simplexml_load_file('gameinfo/' . $game . "/version.xml", 'SimpleXMLElement', LIBXML_NOENT); $latestVersion = (string)($verXML->appVersion); $pkgReborn = "/pkg/".$game."_00/".$latestVersion."/".$game."_00.pkg"; @@ -77,6 +85,13 @@ include("header.php"); $description = $metadataXML->localizedMetadataList->children(); $screenshot = $metadataXML->screenShotList->screenShot; $isplayable = ""; + + $rifKey = null; + if($zrifinfo != "MISSING") { + $rifKey = getZRifKey($zrifinfo); + } + $simulatorZip = '/pkg2zip.php?id='.$game.'&ver='.$latestVersion.'&key='.$rifKey; + if($zrifinfo == "MISSING" && $zrifPendingInfo == "MISSING") { @@ -132,24 +147,16 @@ include("header.php"); PKG (PSMReborn Server) -
NoPsmDrm License
-
- NoPsmDrm License -
- - -
- Decrypted Files (For Simulator) -
-
Decrypted Files (For Simulator)
+ +
NoPsmDrm License
+
Decrypted Files (For Simulator)
+ +
+ NoPsmDrm License +
+
+ Decrypted Files (For Simulator) +