From 0b6f92b690dbe0ec06f2fd9828d1746735bf4ab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=89=E5=B9=BF?= Date: Thu, 30 Mar 2023 19:41:26 +0800 Subject: [PATCH] fix[path-handle]check file path --- pydumpck/__version__.py | 2 +- pydumpck/py_common_dump/__init__.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pydumpck/__version__.py b/pydumpck/__version__.py index 89bb1b4..ab84213 100644 --- a/pydumpck/__version__.py +++ b/pydumpck/__version__.py @@ -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.15.18" +__version__ = "1.15.19" __author__ = "serfend" __author_email__ = "serfend@foxmail.com" __license__ = "MIT Licence" diff --git a/pydumpck/py_common_dump/__init__.py b/pydumpck/py_common_dump/__init__.py index a2be6ea..71d5229 100644 --- a/pydumpck/py_common_dump/__init__.py +++ b/pydumpck/py_common_dump/__init__.py @@ -151,9 +151,11 @@ def main(self, target_file: str, output_directory: str, thread: int = 0, timeout file_type = target_file_type or self.get_filetype(target_file) dispatch_to = self.action_map.get(file_type, None) - logger.debug(f'start dump target file.') + logger.debug(f'start dump target file. type:{dispatch_to}') if dispatch_to != FileTypeFlag.FLAG_NOTFILE: - os.chdir(os.path.dirname(target_file)) + abs_path = os.path.abspath(target_file) + target_dir = os.path.dirname(abs_path) + os.chdir(target_dir) target_file = os.path.basename(target_file) # convert absolute path to relative path time.sleep(3) self.result = self.action_dispatch[dispatch_to](target_file)