mirror of
https://github.com/dobin/SuperMega
synced 2026-06-03 01:27:11 +00:00
refactor: remove prep_web()
This commit is contained in:
@@ -22,7 +22,6 @@ class Storage():
|
|||||||
project = self.get_project(project_name)
|
project = self.get_project(project_name)
|
||||||
if project is None:
|
if project is None:
|
||||||
continue
|
continue
|
||||||
project.settings.prep_web()
|
|
||||||
projects.append(project)
|
projects.append(project)
|
||||||
return projects
|
return projects
|
||||||
|
|
||||||
@@ -35,7 +34,6 @@ class Storage():
|
|||||||
return None
|
return None
|
||||||
with open(json_path, "rb") as f:
|
with open(json_path, "rb") as f:
|
||||||
project = pickle.load(f)
|
project = pickle.load(f)
|
||||||
project.settings.prep_web()
|
|
||||||
return project
|
return project
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -34,8 +34,7 @@ class Settings():
|
|||||||
self.fix_missing_iat = False
|
self.fix_missing_iat = False
|
||||||
self.payload_location = PayloadLocation.DATA
|
self.payload_location = PayloadLocation.DATA
|
||||||
|
|
||||||
|
# directories and filenames
|
||||||
def prep_web(self):
|
|
||||||
self.main_dir = "{}{}/".format(PATH_WEB_PROJECT, self.project_name)
|
self.main_dir = "{}{}/".format(PATH_WEB_PROJECT, self.project_name)
|
||||||
self.main_c_path = self.main_dir + "main.c"
|
self.main_c_path = self.main_dir + "main.c"
|
||||||
self.main_asm_path = self.main_dir + "main.asm"
|
self.main_asm_path = self.main_dir + "main.asm"
|
||||||
|
|||||||
@@ -88,7 +88,6 @@ def main():
|
|||||||
settings.inject_exe_in = args.inject
|
settings.inject_exe_in = args.inject
|
||||||
settings.inject_exe_out = args.inject.replace(".exe", ".infected.exe").replace(".dll", ".infected.dll")
|
settings.inject_exe_out = args.inject.replace(".exe", ".infected.exe").replace(".dll", ".infected.dll")
|
||||||
|
|
||||||
settings.prep_web()
|
|
||||||
write_webproject("default", settings)
|
write_webproject("default", settings)
|
||||||
exit_code = start(settings)
|
exit_code = start(settings)
|
||||||
exit(exit_code)
|
exit(exit_code)
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ def test_exe_code():
|
|||||||
settings.verify = True
|
settings.verify = True
|
||||||
settings.try_start_final_infected_exe = False
|
settings.try_start_final_infected_exe = False
|
||||||
settings.payload_location = PayloadLocation.CODE
|
settings.payload_location = PayloadLocation.CODE
|
||||||
settings.prep_web()
|
|
||||||
|
|
||||||
# 7z, peb-walk, change-entrypoint
|
# 7z, peb-walk, change-entrypoint
|
||||||
print("Test EXE 1/4: 7z, peb-walk, change-entrypoint")
|
print("Test EXE 1/4: 7z, peb-walk, change-entrypoint")
|
||||||
@@ -73,7 +72,6 @@ def test_exe_data():
|
|||||||
settings.verify = True
|
settings.verify = True
|
||||||
settings.try_start_final_infected_exe = False
|
settings.try_start_final_infected_exe = False
|
||||||
settings.payload_location = PayloadLocation.DATA
|
settings.payload_location = PayloadLocation.DATA
|
||||||
settings.prep_web()
|
|
||||||
|
|
||||||
# 7z, peb-walk, change-entrypoint
|
# 7z, peb-walk, change-entrypoint
|
||||||
print("Test EXE 1/4: 7z, peb-walk, change-entrypoint")
|
print("Test EXE 1/4: 7z, peb-walk, change-entrypoint")
|
||||||
@@ -119,7 +117,6 @@ def test_dll_code():
|
|||||||
settings.verify = True
|
settings.verify = True
|
||||||
settings.try_start_final_infected_exe = False
|
settings.try_start_final_infected_exe = False
|
||||||
settings.payload_location = PayloadLocation.CODE
|
settings.payload_location = PayloadLocation.CODE
|
||||||
settings.prep_web()
|
|
||||||
|
|
||||||
print("Test DLL 1/6: libbz2-1.dll, peb-walk, change-entrypoint dllMain (func=None)")
|
print("Test DLL 1/6: libbz2-1.dll, peb-walk, change-entrypoint dllMain (func=None)")
|
||||||
settings.carrier_name = "peb_walk"
|
settings.carrier_name = "peb_walk"
|
||||||
@@ -163,7 +160,6 @@ def test_dll_data():
|
|||||||
settings.verify = True
|
settings.verify = True
|
||||||
settings.try_start_final_infected_exe = False
|
settings.try_start_final_infected_exe = False
|
||||||
settings.payload_location = PayloadLocation.DATA
|
settings.payload_location = PayloadLocation.DATA
|
||||||
settings.prep_web()
|
|
||||||
|
|
||||||
print("Test DLL 1/6: libbz2-1.dll, peb-walk, change-entrypoint dllMain (func=None)")
|
print("Test DLL 1/6: libbz2-1.dll, peb-walk, change-entrypoint dllMain (func=None)")
|
||||||
settings.carrier_name = "peb_walk"
|
settings.carrier_name = "peb_walk"
|
||||||
|
|||||||
Reference in New Issue
Block a user