From c6ee9196197a6fc1af2e690c944d667a837a6b55 Mon Sep 17 00:00:00 2001 From: Aayush Goel <81844215+Aayush-Goel-04@users.noreply.github.com> Date: Tue, 22 Aug 2023 15:52:04 +0530 Subject: [PATCH] Update capa/features/common.py Co-authored-by: Willi Ballenthin --- capa/features/common.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/capa/features/common.py b/capa/features/common.py index 4a12cb7a..2b54e52d 100644 --- a/capa/features/common.py +++ b/capa/features/common.py @@ -444,10 +444,9 @@ def get_guid_string_and_bytes(name: str, com_type: str): return guid_string, guid_bytes -class COMFactory: - def __new__(cls, com_name: str, com_type: str): - guid_string, guid_bytes = get_guid_string_and_bytes(com_name, com_type) - return capa.engine.Or([Bytes(guid_bytes, com_name), String(guid_string, com_name)]) +def translate_com_feature(com_name: str, com_type: str) -> capa.engine.Statement: + guid_string, guid_bytes = get_guid_string_and_bytes(com_name, com_type) + return capa.engine.Or([Bytes(guid_bytes, com_name), String(guid_string, com_name)]) # other candidates here: https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#machine-types