From aa711d97fef88a769f05017f15ae2d4e6aa5e495 Mon Sep 17 00:00:00 2001 From: Dump-GUY <59492005+Dump-GUY@users.noreply.github.com> Date: Mon, 7 Dec 2020 23:34:55 +0100 Subject: [PATCH] Bug Fix in dll export without func name https://github.com/danielplohmann/apiscout/issues/23 --- apiscout/db_builder/DatabaseBuilder.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apiscout/db_builder/DatabaseBuilder.py b/apiscout/db_builder/DatabaseBuilder.py index 8555f5d..034c3d7 100644 --- a/apiscout/db_builder/DatabaseBuilder.py +++ b/apiscout/db_builder/DatabaseBuilder.py @@ -115,7 +115,10 @@ def _extractPeExports(self, filepath): max_addr = max(pe.OPTIONAL_HEADER.ImageBase + exp.address, max_addr) export_info["address"] = exp.address - export_info["name"] = exp.name.decode("utf-8") + if exp.name == None: + export_info["name"] = "None" + else: + export_info["name"] = exp.name.decode("utf-8") export_info["ordinal"] = exp.ordinal dll_entry["exports"].append(export_info)