Skip to content

Commit

Permalink
Release 2019.06.30.post1: Still display determined data if reading/de…
Browse files Browse the repository at this point in the history
…cryption of items fail

* FIX: Still display determined data if reading/decryption of items fail
  • Loading branch information
windsurfer1122 committed Jul 1, 2019
1 parent d06bcf9 commit 91911a8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,8 @@
# PSN_get_pkg_info.py - Changelog

## 2019.06.30.post1
* FIX: Still display determined data if reading/decryption of items fail

## 2019.06.30
* NEW: Added support for PS3/PSX/PSP/PSV/PSM debug packages
* NEW: Added dependency to Python module fastxor for debug packages
Expand Down
17 changes: 10 additions & 7 deletions PSN_get_pkg_info.py
Expand Up @@ -58,7 +58,7 @@

## Version definition
## see https://www.python.org/dev/peps/pep-0440/
__version__ = "2019.06.30"
__version__ = "2019.06.30.post1"
__author__ = "https://github.com/windsurfer1122/PSN_get_pkg_info"
__license__ = "GPL"
__copyright__ = "Copyright 2018-2019, windsurfer1122"
Expand Down Expand Up @@ -2082,7 +2082,9 @@ def parsePkg3ItemsInfo(header_fields, meta_data, input_stream, function_debug_le
input_stream.close(function_debug_level)
eprint("Could not get PKG3 encrypted data at offset {:#x} with size {} from".format(header_fields["DATAOFS"]+read_offset, read_size), input_stream.getSource())
eprint("", prefix=None)
raise ## re-raise
print_exc_plus()
return None, None
#raise ## re-raise
#
items_info_bytes[CONST_DATATYPE_DECRYPTED].extend(items_info_bytes[CONST_DATATYPE_AS_IS][len(items_info_bytes[CONST_DATATYPE_DECRYPTED]):])
else:
Expand Down Expand Up @@ -2825,11 +2827,12 @@ def createArgParser():
if not Pkg_Header["KEYINDEX"] is None:
Pkg_Item_Entries, Package["ITEMS_INFO_BYTES"] = parsePkg3ItemsInfo(Pkg_Header, Pkg_Meta_Data, Input_Stream, max(0, Debug_Level))
#
Results["ITEMS_INFO"] = copy.copy(Package["ITEMS_INFO_BYTES"])
if CONST_DATATYPE_AS_IS in Results["ITEMS_INFO"]:
del Results["ITEMS_INFO"][CONST_DATATYPE_AS_IS]
if CONST_DATATYPE_DECRYPTED in Results["ITEMS_INFO"]:
del Results["ITEMS_INFO"][CONST_DATATYPE_DECRYPTED]
if not Pkg_Item_Entries is None:
Results["ITEMS_INFO"] = copy.copy(Package["ITEMS_INFO_BYTES"])
if CONST_DATATYPE_AS_IS in Results["ITEMS_INFO"]:
del Results["ITEMS_INFO"][CONST_DATATYPE_AS_IS]
if CONST_DATATYPE_DECRYPTED in Results["ITEMS_INFO"]:
del Results["ITEMS_INFO"][CONST_DATATYPE_DECRYPTED]
#
Results["DEBUG_PKG"] = Pkg_Header["DEBUG_PKG"]
#
Expand Down

0 comments on commit 91911a8

Please sign in to comment.