mirror of
https://github.com/cuckoosandbox/cuckoo.git
synced 2026-10-12 02:12:40 +00:00
resolve mock.patch issues on cuckoo.common
This commit is contained in:
@@ -52,7 +52,7 @@ class ExtractManager(object):
|
||||
ext.yara_rules = ext.yara_rules,
|
||||
|
||||
def __del__(self):
|
||||
ExtractManager._instances.pop(self.task_id, None)
|
||||
self._instances.pop(self.task_id, None)
|
||||
|
||||
def write_extracted(self, ext, payload):
|
||||
dirpath = cwd("extracted", analysis=self.task_id)
|
||||
|
||||
+2
-1
@@ -119,6 +119,7 @@ def load_signatures():
|
||||
# Forward everything from lib.cuckoo to "our" cuckoo module.
|
||||
sys.modules["lib"] = types.ModuleType("lib")
|
||||
sys.modules["lib.cuckoo"] = sys.modules["cuckoo"]
|
||||
sys.modules["lib.cuckoo.common"] = sys.modules["cuckoo.common"]
|
||||
|
||||
# Import this here in order to avoid recursive import statements.
|
||||
from cuckoo.common.abstracts import Signature
|
||||
@@ -133,7 +134,7 @@ def load_signatures():
|
||||
dont_write_bytecode = sys.dont_write_bytecode
|
||||
sys.dont_write_bytecode = True
|
||||
|
||||
# Trigger an import on $CWD/signatures. This will automatically import
|
||||
# Trigger an import on $CWD/signatures/. This will automatically import
|
||||
# recursively down the various directories through the use of
|
||||
# enumerate_plugins(), which the Cuckoo Community adheres to. For this to
|
||||
# work we temporarily insert the CWD in Python's path.
|
||||
|
||||
Reference in New Issue
Block a user