fix: keep registers after remote shellcode

This commit is contained in:
əlemi 2023-03-28 19:11:10 +02:00
parent c4fb1182f7
commit b5236f7d27
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -30,8 +30,7 @@ impl RemoteOperation for RemoteShellcode<'_> {
ptrace::cont(pid, None)?;
waitpid(pid, None)?;
let after_regs = ptrace::getregs(pid)?;
println!("Executed shellcode (RIP: 0x{:X}", after_regs.rip);
ptrace::setregs(pid, original_regs)?;
println!("Executed shellcode (RIP: 0x{:X})", after_regs.rip);
Ok(ptr)
}
}