Skip to content

Commit

Permalink
feat[plugin]skip if not enable
Browse files Browse the repository at this point in the history
  • Loading branch information
serfend committed May 16, 2023
1 parent bbc8246 commit 686bc1c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pydumpck/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__description__ = "pydumpck is a multi-threads tool for decompile exe,elf,pyz,pyc packed by python which is base on pycdc and uncompyle6.sometimes its py-file result not exactly right ,maybe could use uncompyle6."
__keywords__ = ['pydumpck', 'decomplier', 'pe', 'elf', 'pyc', 'pyz']
__url__ = "https://github.com/serfend/pydumpck"
__version__ = "1.16.0"
__version__ = "1.16.1"
__author__ = "serfend"
__author_email__ = "serfend@foxmail.com"
__license__ = "MIT Licence"
Expand Down
13 changes: 9 additions & 4 deletions pydumpck/pyc_checker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,16 @@ def dump(data: bytes, target_file: str, structed_pyc_file: str, timeout: int = 1
filename = extensions.get_filename(structed_pyc_file)
if configuration.decompile_file != None and filename not in configuration.decompile_file and pyimod00_crypto_key != filename:
return (None, f'not in decompile files:{filename}')
content_cdc, err_cdc = exec_pycdc(structed_pyc_file, target_file, timeout)
content_uncompyle6, err_uncompyle6 = exec_uncompyle6(
structed_pyc_file, target_file, timeout)
err_cdc = err_uncompyle6 = None
content_cdc = content_uncompyle6 = None
if configuration.plugin_decompiler_enable_pycdc:
content_cdc, err_cdc = exec_pycdc(
structed_pyc_file, target_file, timeout)
if configuration.plugin_decompiler_enable_uncompyle6:
content_uncompyle6, err_uncompyle6 = exec_uncompyle6(
structed_pyc_file, target_file, timeout)
# TODO log error info
content = content_cdc or content_uncompyle6
content = content_cdc or content_uncompyle6 or 'no plugin is enable.'
err = err_cdc or err_uncompyle6
err = Exception(
err, f'fail when handling {target_file} -> {structed_pyc_file}') if isinstance(err, Exception) else err
Expand Down

0 comments on commit 686bc1c

Please sign in to comment.