rev shell fixes

This commit is contained in:
2023-10-05 15:43:20 +02:00
parent 1cded84850
commit 47f5da3983
3 changed files with 45 additions and 14 deletions

View File

@@ -189,9 +189,9 @@ def genSyscall(elf, syscall, registers):
rop.raw(rop.find_gadget([syscall_gadget]).address)
return rop
def pad(x, n):
def pad(x, n, b=b"\x00"):
if len(x) % n != 0:
x += (n-(len(x)%n))*b"\x00"
x += (n-(len(x)%n))*b
return x
def xor(a, b):