From 0066b3f33ab17eb96c654c29a45eb2b3b6215775 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 May 2022 13:28:48 -0600 Subject: [PATCH] build(deps): bump dnfile from 0.10.0 to 0.11.0 (#1004) --- capa/features/extractors/dnfile/helpers.py | 6 +++--- setup.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/capa/features/extractors/dnfile/helpers.py b/capa/features/extractors/dnfile/helpers.py index c7304462..4457afe9 100644 --- a/capa/features/extractors/dnfile/helpers.py +++ b/capa/features/extractors/dnfile/helpers.py @@ -105,7 +105,7 @@ def get_dotnet_managed_imports(pe: dnfile.dnPE) -> Iterator[Tuple[int, str]]: TypeName (index into String heap) TypeNamespace (index into String heap) """ - if not hasattr(pe.net.mdtables, "MemberRef"): + if not hasattr(pe.net.mdtables, "MemberRef") or pe.net.mdtables.MemberRef is None: return for (rid, row) in enumerate(pe.net.mdtables.MemberRef): @@ -130,7 +130,7 @@ def get_dotnet_unmanaged_imports(pe: dnfile.dnPE) -> Iterator[Tuple[int, str]]: ImportName (index into the String heap) ImportScope (index into the ModuleRef table) """ - if not hasattr(pe.net.mdtables, "ImplMap"): + if not hasattr(pe.net.mdtables, "ImplMap") or pe.net.mdtables.ImplMap is None: return for row in pe.net.mdtables.ImplMap: @@ -154,7 +154,7 @@ def get_dotnet_unmanaged_imports(pe: dnfile.dnPE) -> Iterator[Tuple[int, str]]: def get_dotnet_managed_method_bodies(pe: dnfile.dnPE) -> Iterator[CilMethodBody]: """get managed methods from MethodDef table""" - if not hasattr(pe.net.mdtables, "MethodDef"): + if not hasattr(pe.net.mdtables, "MethodDef") or pe.net.mdtables.MethodDef is None: return for row in pe.net.mdtables.MethodDef: diff --git a/setup.py b/setup.py index 29e3acf1..b9cabb91 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ requirements = [ "smda==1.7.1", "pefile==2021.9.3", "pyelftools==0.28", - "dnfile==0.10.0", + "dnfile==0.11.0", "dncil==1.0.0", ]