Skip to content

Commit

Permalink
pocketstation extraction
Browse files Browse the repository at this point in the history
- added pocketstation extraction, but it is likely landing in the wrong directory
- Fixed issue #13
  • Loading branch information
lusid1 authored Feb 5, 2019
1 parent eba797b commit ebd4ecf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkg2zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ int main(int argc, char* argv[])
aes128_ctr_xor(item_key, iv, name_offset / 16, (uint8_t*)name, name_size);
name[name_size] = 0;

// sys_output("[%u/%u] %s\n", item_index + 1, item_count, name);
// sys_output("[%u/%u] %s\n", item_index + 1, item_count, name);

if (flags == 4 || flags == 18)
{
Expand Down Expand Up @@ -822,7 +822,7 @@ int main(int argc, char* argv[])
else
{
int decrypt = 1;
if ((type == PKG_TYPE_VITA_APP || type == PKG_TYPE_VITA_DLC || type == PKG_TYPE_VITA_PATCH || type == PKG_TYPE_VITA_THEME) && strcmp("sce_sys/package/digs.bin", name) == 0)
if ((type == PKG_TYPE_VITA_APP || type == PKG_TYPE_VITA_DLC || type == PKG_TYPE_VITA_PATCH || type == PKG_TYPE_VITA_THEME) && (strcmp("sce_sys/package/digs.bin", name) == 0 || strcmp("sce_sys/package/cert.bin", name) == 0 ))
{
// TODO: is this really needed?
if (!sce_sys_package_created)
Expand All @@ -846,6 +846,10 @@ int main(int argc, char* argv[])
{
snprintf(path, sizeof(path), "%s/EBOOT.PBP", root);
}
else if (strcmp("USRDIR/CONTENT/texture.enc", name) == 0)
{
snprintf(path, sizeof(path), "%s/texture.enc", root);
}
else
{
continue;
Expand Down Expand Up @@ -951,7 +955,7 @@ int main(int argc, char* argv[])

sys_output("[*] unpacking completed\n");

if (type == PKG_TYPE_VITA_APP || type == PKG_TYPE_VITA_DLC || type == PKG_TYPE_VITA_PATCH || PKG_TYPE_VITA_THEME)
if (type == PKG_TYPE_VITA_APP || type == PKG_TYPE_VITA_DLC || type == PKG_TYPE_VITA_PATCH || type == PKG_TYPE_VITA_THEME)
{
if (!sce_sys_package_created)
{
Expand Down

0 comments on commit ebd4ecf

Please sign in to comment.