mirror of
https://github.com/dobin/SuperMega
synced 2026-06-03 01:27:11 +00:00
fix: masm_shc error because of late include fixes
This commit is contained in:
+6
-5
@@ -72,6 +72,12 @@ def fixup_asm_file(filename: FilePath, payload_len: int):
|
|||||||
# if "jmp\tSHORT" in lines[idx]:
|
# if "jmp\tSHORT" in lines[idx]:
|
||||||
# lines[idx] = lines[idx].replace("SHORT", "")
|
# lines[idx] = lines[idx].replace("SHORT", "")
|
||||||
|
|
||||||
|
for idx, line in enumerate(lines):
|
||||||
|
# Remove EXTRN, we dont need it
|
||||||
|
# Even tho it is part of IAT_REUSE process (see fixup_iat_reuse())
|
||||||
|
if "EXTRN __imp_" in lines[idx]:
|
||||||
|
lines[idx] = "; " + lines[idx]
|
||||||
|
|
||||||
# replace external reference with shellcode reference
|
# replace external reference with shellcode reference
|
||||||
for idx, line in enumerate(lines):
|
for idx, line in enumerate(lines):
|
||||||
if "supermega_payload" in lines[idx]:
|
if "supermega_payload" in lines[idx]:
|
||||||
@@ -137,11 +143,6 @@ def fixup_iat_reuse(filename: FilePath, exe_info):
|
|||||||
|
|
||||||
# do IAT reuse
|
# do IAT reuse
|
||||||
for idx, line in enumerate(lines):
|
for idx, line in enumerate(lines):
|
||||||
# Remove EXTRN, we dont need it
|
|
||||||
if "EXTRN __imp_" in lines[idx]:
|
|
||||||
lines[idx] = "; " + lines[idx]
|
|
||||||
continue
|
|
||||||
|
|
||||||
# Fix call
|
# Fix call
|
||||||
# call QWORD PTR __imp_GetEnvironmentVariableW
|
# call QWORD PTR __imp_GetEnvironmentVariableW
|
||||||
if "call" in lines[idx] and "__imp_" in lines[idx]:
|
if "call" in lines[idx] and "__imp_" in lines[idx]:
|
||||||
|
|||||||
Reference in New Issue
Block a user