mirror of
https://github.com/dobin/SuperMega
synced 2026-06-02 17:27:10 +00:00
refactor: reorganize files into data/
This commit is contained in:
@@ -8,7 +8,7 @@ from phases.datareuse import *
|
||||
|
||||
class DataReuseTest(unittest.TestCase):
|
||||
def test_relocation_list(self):
|
||||
data_reuser = DataReuser("exes/7z.exe")
|
||||
data_reuser = DataReuser("data/exes/7z.exe")
|
||||
data_reuser.init()
|
||||
|
||||
relocs = data_reuser.get_relocations_for_section(".rdata")
|
||||
@@ -21,7 +21,7 @@ class DataReuseTest(unittest.TestCase):
|
||||
|
||||
|
||||
def test_largestgap(self):
|
||||
data_reuser = DataReuser("exes/7z.exe")
|
||||
data_reuser = DataReuser("data/exes/7z.exe")
|
||||
data_reuser.init()
|
||||
|
||||
size, start, stop = data_reuser.get_reloc_largest_gap(".rdata")
|
||||
|
||||
@@ -28,13 +28,13 @@ class DerBackdoorerTest(unittest.TestCase):
|
||||
|
||||
def test_backdoor_ep(self):
|
||||
# Write example shellcode
|
||||
shellcode_path = "exes/shellcode.test"
|
||||
shellcode_path = "data/exes/shellcode.test"
|
||||
shellcode = b"\x90" * 200
|
||||
with open(shellcode_path, "wb") as f:
|
||||
f.write(shellcode)
|
||||
|
||||
exe_path = "exes/iattest-full.exe"
|
||||
exe_out_path = "exes/iattest-full-test.exe"
|
||||
exe_path = "data/exes/iattest-full.exe"
|
||||
exe_out_path = "data/exes/iattest-full-test.exe"
|
||||
|
||||
shutil.copyfile(exe_path, exe_out_path)
|
||||
|
||||
@@ -59,12 +59,12 @@ class DerBackdoorerTest(unittest.TestCase):
|
||||
def test_backdoor_hijack(self):
|
||||
# Write example shellcode
|
||||
shellcode = b"\x90" * 200
|
||||
with open("exes/shellcode.test", "wb") as f:
|
||||
with open("data/exes/shellcode.test", "wb") as f:
|
||||
f.write(shellcode)
|
||||
|
||||
shellcode_path = "exes/shellcode.test"
|
||||
exe_path = "exes/7z.exe"
|
||||
exe_out_path = "exes/7z-test.exe"
|
||||
shellcode_path = "data/exes/shellcode.test"
|
||||
exe_path = "data/exes/7z.exe"
|
||||
exe_out_path = "data/exes/7z-test.exe"
|
||||
|
||||
shutil.copyfile(exe_path, exe_out_path)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user