Skip to content

Commit

Permalink
Some more changed archive header error handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
CensoredUsername committed Mar 16, 2024
1 parent 2899506 commit 6ba7899
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion unrpyc.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ def read_ast_from_file(in_file):

contents = chunks[1]

contents = zlib.decompress(contents)
try:
contents = zlib.decompress(contents)
except Exception as e:
raise Exception(
"Did not find a zlib compressed blob where it was expected. Either the header has been "
"modified or the file structure has been changed.") from None

# add some detection of ren'py 7 files
if is_rpyc_v1 or pickle_detect_python2(contents):
Expand Down

0 comments on commit 6ba7899

Please sign in to comment.