refactor: read shellcode (carrier, payload) directly, no more files

This commit is contained in:
Dobin
2024-05-08 14:34:19 +01:00
parent 012d1253af
commit 3aa79afd70
6 changed files with 41 additions and 47 deletions
+5 -2
View File
@@ -22,13 +22,16 @@ PATH_WEB_PROJECT = "projects/"
# Correlated with real template files
# in data/plugins/
class DecoderStyle(Enum):
PLAIN_1 = "plain_1"
XOR_1 = "xor_1"
class PayloadLocation(Enum):
CODE = "code"
DATA = "data"
class CarrierInvokeStyle(Enum):
ChangeEntryPoint = "change AddressOfEntryPoint"
BackdoorCallInstr = "hijack branching instruction in entrypoint"
+5 -1
View File
@@ -5,7 +5,7 @@ logger = logging.getLogger("Views")
class Settings():
def __init__(self, web=""):
def __init__(self):
self.payload_path: FilePath = ""
# Settings
@@ -29,6 +29,10 @@ class Settings():
self.generate_asm_from_c: bool = True
self.generate_shc_from_asm: bool = True
# More
self.fix_missing_iat = False
self.payload_location = PayloadLocation.CODE
def prep_web(self, project_name):
self.main_dir = "{}{}/".format(PATH_WEB_PROJECT, project_name)