diff --git a/pefile.py b/pefile.py index f804678..57de8d0 100644 --- a/pefile.py +++ b/pefile.py @@ -5959,7 +5959,7 @@ def parse_import_directory(self, rva, size, dllnames_only=False): if not symbol or not symbol.name: continue name = symbol.name - if type(symbol.name) == bytes: + if isinstance(symbol.name, bytes): name = symbol.name.decode("utf-8") if name.startswith(suspicious_symbol): suspicious_imports_count += 1