refactor: make web work again (split project <-> settings)

This commit is contained in:
Dobin Rutishauser
2025-06-18 21:24:35 +02:00
parent fcb40ccb6a
commit 6864656381
20 changed files with 214 additions and 349 deletions
+3 -3
View File
@@ -33,7 +33,7 @@ class Injector():
# superpe is a representation of the exe file. We gonna modify it, and save it at the end.
# reuse from injectable
#self.superpe = SuperPe(settings.inject_exe_in)
#self.superpe = SuperPe(settings.get_inject_exe_in())
self.superpe = injectable.superpe
self.function_backdoorer = FunctionBackdoorer(self.superpe)
@@ -110,8 +110,8 @@ class Injector():
## Inject
def inject_exe(self):
exe_in = self.settings.inject_exe_in
exe_out = self.settings.inject_exe_out
exe_in = self.settings.get_inject_exe_in()
exe_out = self.settings.get_inject_exe_out()
carrier_invoke_style: CarrierInvokeStyle = self.settings.carrier_invoke_style
logger.info("-[ Injecting Carrier".format())
+2 -2
View File
@@ -29,7 +29,7 @@ def create_c_from_template(settings: Settings, payload_len: int):
dst = "{}{}/".format(PATH_WEB_PROJECT, settings.project_name)
logger.info("-[ Carrier create Template: {}".format(
settings.main_c_path))
settings.project_c_path))
# check that source directory exists
if not os.path.exists(src):
@@ -139,6 +139,6 @@ def create_c_from_template(settings: Settings, payload_len: int):
'PAYLOAD_LEN': payload_len,
'plugin_virtualprotect': plugin_virtualprotect,
})
with open(settings.main_c_path, "w", encoding='utf-8') as file:
with open(settings.project_c_path, "w", encoding='utf-8') as file:
file.write(rendered_template)
observer.add_text_file("main_c_rendered", rendered_template)