mirror of
https://github.com/dobin/SuperMega
synced 2026-06-03 01:27:11 +00:00
refactor: move working directory to projects/ for web
This commit is contained in:
+2
-1
@@ -10,12 +10,13 @@ VerifyFilename: FilePath = r'C:\Temp\a'
|
||||
# Directory structure
|
||||
PATH_EXES = "data/binary/exes/"
|
||||
PATH_SHELLCODES = "data/binary/shellcodes/"
|
||||
PATH_CARRIER = "data/source/carrier/"
|
||||
PATH_PEB_WALK = "data/source/carrier/peb_walk/"
|
||||
PATH_IAT_REUSE = "data/source/carrier/iat_reuse/"
|
||||
PATH_PAYLOAD = "data/source/payload/"
|
||||
PATH_DECODER = "data/source/carrier/decoder/"
|
||||
|
||||
PATH_WEB_PROJECT = "app/projects/" # web only
|
||||
PATH_WEB_PROJECT = "projects/"
|
||||
|
||||
|
||||
# Correlated with real template files
|
||||
|
||||
+13
-3
@@ -2,7 +2,7 @@ from model.defs import *
|
||||
|
||||
|
||||
class Settings():
|
||||
def __init__(self):
|
||||
def __init__(self, web=""):
|
||||
self.payload_path: FilePath = ""
|
||||
|
||||
# Settings
|
||||
@@ -29,10 +29,20 @@ class Settings():
|
||||
|
||||
|
||||
def prep(self):
|
||||
self.main_dir = "data/source/carrier/" + self.source_style.value + "/"
|
||||
|
||||
self.main_dir = "{}{}/".format(PATH_CARRIER, self.source_style.value)
|
||||
self.template_path = self.main_dir + "template.c"
|
||||
self.main_c_path = self.main_dir + "main.c"
|
||||
self.main_asm_path = self.main_dir + "main.asm"
|
||||
self.main_exe_path = self.main_dir + "main.exe"
|
||||
self.main_shc_path = self.main_dir + "main.bin"
|
||||
|
||||
|
||||
def prep_web(self, project_name):
|
||||
self.main_dir = "{}{}/".format(PATH_WEB_PROJECT, project_name)
|
||||
self.template_path = self.main_dir + "template.c"
|
||||
self.main_c_path = self.main_dir + "main.c"
|
||||
self.main_asm_path = self.main_dir + "main.asm"
|
||||
self.main_exe_path = self.main_dir + "main.exe"
|
||||
self.main_shc_path = self.main_dir + "main.bin"
|
||||
self.inject_exe_out = "{}{}".format(
|
||||
self.main_dir, os.path.basename(self.inject_exe_in).replace(".exe", ".infected.exe"))
|
||||
|
||||
Reference in New Issue
Block a user