mirror of
https://github.com/dobin/SuperMega
synced 2026-06-02 17:27:10 +00:00
refactor: make web work again (split project <-> settings)
This commit is contained in:
+3
-3
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user