We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df3dcc9 commit 5e5df87Copy full SHA for 5e5df87
qiling/loader/elf.py
@@ -68,9 +68,14 @@ def __init__(self, ql: Qiling):
68
def run(self):
69
if self.ql.code:
70
self.ql.mem.map(self.ql.os.entry_point, self.ql.os.code_ram_size, info="[shellcode_stack]")
71
- self.ql.os.entry_point = (self.ql.os.entry_point + 0x200000 - 0x1000)
72
- self.ql.mem.write(self.ql.os.entry_point, self.ql.code)
73
- self.ql.arch.regs.arch_sp = self.ql.os.entry_point
+
+ shellcode_base = self.ql.os.entry_point + 0x200000 - 0x1000
+ self.ql.mem.write(shellcode_base, self.ql.code)
74
75
+ self.ql.arch.regs.arch_sp = shellcode_base
76
+ self.ql.os.entry_point = shellcode_base
77
+ self.load_address = shellcode_base
78
79
return
80
81
section = {
0 commit comments