mirror of
https://github.com/dobin/SuperMega
synced 2026-06-02 17:27:10 +00:00
Merge branch 'main' of https://github.com/dobin/SuperMega
This commit is contained in:
@@ -127,17 +127,6 @@ def file_readall_binary(filepath) -> bytes:
|
|||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
def carrier_invoke_style_str(carrier_invoke_style):
|
|
||||||
carrier_invoke_style = str(carrier_invoke_style)
|
|
||||||
if carrier_invoke_style == "1":
|
|
||||||
return "change address of entrypoint"
|
|
||||||
elif carrier_invoke_style == "2":
|
|
||||||
return "hijack branching instruction in entrypoint"
|
|
||||||
else:
|
|
||||||
return "Invalid: {}".format(carrier_invoke_style)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def file_to_lf(filename):
|
def file_to_lf(filename):
|
||||||
with open(filename, 'rb') as f:
|
with open(filename, 'rb') as f:
|
||||||
data = f.read()
|
data = f.read()
|
||||||
|
|||||||
+2
-2
@@ -34,8 +34,8 @@ class PayloadLocation(Enum):
|
|||||||
|
|
||||||
|
|
||||||
class CarrierInvokeStyle(Enum):
|
class CarrierInvokeStyle(Enum):
|
||||||
ChangeEntryPoint = "change AddressOfEntryPoint"
|
ChangeEntryPoint = "change EntryPoint"
|
||||||
BackdoorCallInstr = "hijack branching instruction in entrypoint"
|
BackdoorCallInstr = "hijack Main"
|
||||||
|
|
||||||
|
|
||||||
class FunctionInvokeStyle(Enum):
|
class FunctionInvokeStyle(Enum):
|
||||||
|
|||||||
+1
-3
@@ -67,9 +67,7 @@ def main():
|
|||||||
elif args.carrier_invoke == "backdoor":
|
elif args.carrier_invoke == "backdoor":
|
||||||
settings.carrier_invoke_style = CarrierInvokeStyle.BackdoorCallInstr
|
settings.carrier_invoke_style = CarrierInvokeStyle.BackdoorCallInstr
|
||||||
else:
|
else:
|
||||||
logging.error("Invalid carrier_invoke, use one of:")
|
logging.error("Invalid carrier_invoke, use: eop, backdoor")
|
||||||
for i in ["eop", "backdoor"]:
|
|
||||||
logging.error(" {} {}".format(i, carrier_invoke_style_str(i)))
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if not args.shellcode or not args.inject:
|
if not args.shellcode or not args.inject:
|
||||||
|
|||||||
Reference in New Issue
Block a user