mirror of
https://github.com/mandiant/capa.git
synced 2026-02-05 03:16:56 -08:00
update the Registry, Filename, and Mutex classes
This commit is contained in:
@@ -273,40 +273,15 @@ class _MatchedSubstring(Substring):
|
||||
|
||||
|
||||
class Registry(String):
|
||||
# todo: add a way to tell whether this registry key was created, accessed, or deleted.
|
||||
def __init__(self, value: str, description=None):
|
||||
super().__init__(value, description)
|
||||
|
||||
def __eq__(self, other):
|
||||
# Registry instance is in a ruleset
|
||||
if isinstance(other, Registry):
|
||||
return super().__eq__(other)
|
||||
return False
|
||||
pass
|
||||
|
||||
|
||||
class Filename(String):
|
||||
# todo: add a way to tell whether this file was created, accessed, or deleted.
|
||||
def __init__(self, value: str, description=None):
|
||||
super().__init__(value, description)
|
||||
|
||||
def __eq__(self, other):
|
||||
# Mutex instance is in a ruleset
|
||||
if isinstance(other, Filename):
|
||||
return super().__eq__(other)
|
||||
return False
|
||||
pass
|
||||
|
||||
|
||||
class Mutex(String):
|
||||
# todo: add a way to tell whether this mutex was created or used
|
||||
def __init__(self, value: str, description=None):
|
||||
super().__init__(value, description)
|
||||
|
||||
def __eq__(self, other):
|
||||
# Mutex instance is in a ruleset
|
||||
if isinstance(other, Mutex):
|
||||
return super().__eq__(other)
|
||||
return False
|
||||
|
||||
pass
|
||||
|
||||
class Regex(String):
|
||||
def __init__(self, value: str, description=None):
|
||||
|
||||
Reference in New Issue
Block a user