forked from Li/psmreborn
28 lines
695 B
PHP
28 lines
695 B
PHP
<?php
|
|
|
|
require_once "php_pkg/pkg2zip.php";
|
|
|
|
function addPsmFiles($zip) {
|
|
$zip->AddDirectory("Documents");
|
|
$zip->AddDirectory("System");
|
|
$zip->AddDirectory("Temp");
|
|
$zip->AddFileFromString("RunInSimulator.bat", '"%SCE_PSM_SDK%\target\win32\psm.exe" "%CD%\Application\app.exe"');
|
|
}
|
|
|
|
if(!(isset($_GET["id"]) && isset($_GET["ver"]) && isset($_GET["key"]))) {
|
|
echo("missing parameters");
|
|
die();
|
|
}
|
|
|
|
$id = str_replace("/", "", $_GET["id"]);
|
|
$ver = str_replace("/", "", $_GET["ver"]);
|
|
$key = hex2bin($_GET["key"]);
|
|
|
|
$f = fopen('./pkg/'.$id.'_00/'.$ver.'/'.$id.'_00.pkg', 'rb');
|
|
if(!$f) {
|
|
echo("cant find pkg");
|
|
die();
|
|
}
|
|
pkg2zip($f, $id, $key, 'addPsmFiles');
|
|
fclose($f);
|