feature: disable observer in tests

This commit is contained in:
Dobin
2024-02-19 16:35:59 +00:00
parent 2029be0ce8
commit 0f68a242da
3 changed files with 13 additions and 0 deletions
+5
View File
@@ -6,9 +6,14 @@ import logging
from phases.compiler import fixup_asm_file, fixup_iat_reuse
from model import ExeInfo
from defs import *
from observer import observer
class AsmTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
observer.active = False
def test_asm_fixup(self):
path_in: FilePath = "tests/data/peb_walk_pre_fixup.asm"
path_working: FilePath = "tests/data/peb_walk_pre_fixup.asm.test"
+5
View File
@@ -7,6 +7,7 @@ from model import ExeInfo
from defs import *
from pehelper import extract_code_from_exe
from helper import hexdump
from observer import observer
from derbackdoorer.derbackdoorer import PeBackdoor
@@ -21,6 +22,10 @@ from derbackdoorer.derbackdoorer import PeBackdoor
# * The call has been patched
class DerBackdoorerTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
observer.active = False
def test_backdoor_ep(self):
# Write example shellcode
shellcode_path = "exes/shellcode.test"