mirror of
https://github.com/extremecoders-re/pyinstxtractor.git
synced 2026-06-09 11:05:32 +00:00
Save embedded packages and modules with pyc extension
This commit is contained in:
parent
0069e67f73
commit
b9810a79be
1 changed files with 8 additions and 0 deletions
|
|
@ -248,9 +248,17 @@ class PyInstArchive:
|
|||
assert len(data) == entry.uncmprsdDataSize # Sanity Check
|
||||
|
||||
if entry.typeCmprsData == b's':
|
||||
# s -> ARCHIVE_ITEM_PYSOURCE
|
||||
# Entry point are expected to be python scripts
|
||||
print('[+] Possible entry point: {0}.pyc'.format(entry.name))
|
||||
self._writePyc(entry.name + '.pyc', data)
|
||||
|
||||
elif entry.typeCmprsData == b'M' or entry.typeCmprsData == b'm':
|
||||
# M -> ARCHIVE_ITEM_PYPACKAGE
|
||||
# m -> ARCHIVE_ITEM_PYMODULE
|
||||
# packages and modules are pyc files with their header's intact
|
||||
with open(entry.name + '.pyc', 'wb') as f:
|
||||
f.write(data)
|
||||
|
||||
else:
|
||||
with open(entry.name, 'wb') as f:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue