Skip to content

Commit

Permalink
修复导入表为空时崩溃的错误
Browse files Browse the repository at this point in the history
  • Loading branch information
qux-bbb committed Sep 19, 2023
1 parent 616c486 commit 88b4f9e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xanalyzer/file_process/pe.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ def get_dll_name(self):

def get_exe_import_api_list(self, lower_flag=False):
exe_import_api_list = []
if not hasattr(self.pe_file, "DIRECTORY_ENTRY_IMPORT"):
return []
directory_entry_import = self.pe_file.DIRECTORY_ENTRY_IMPORT
for entry_import in directory_entry_import:
dll_name = entry_import.dll.decode()
Expand Down

0 comments on commit 88b4f9e

Please sign in to comment.