mirror of
https://github.com/dobin/SuperMega
synced 2026-06-02 17:27:10 +00:00
feature: disable observer in tests
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user