From 8f10855336e2dade5f1de358f89c4fd9c9fd0914 Mon Sep 17 00:00:00 2001 From: rdbo Date: Wed, 17 Apr 2024 08:58:46 -0300 Subject: [PATCH] fixed x86_32 hook payload --- src/common/arch/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/arch/x86.c b/src/common/arch/x86.c index 8a48ac03..64dc45af 100644 --- a/src/common/arch/x86.c +++ b/src/common/arch/x86.c @@ -21,7 +21,7 @@ generate_hook_payload(lm_address_t from, lm_address_t to, lm_size_t bits, lm_byt */ snprintf(code, sizeof(code), "jmp [rip]; nop; nop; nop; nop; nop; nop; nop; nop"); } else { - snprintf(code, sizeof(code), "jmp %lx", (unsigned long)to); + snprintf(code, sizeof(code), "jmp 0x%x", (unsigned int)to); } size = LM_AssembleEx(code, get_architecture(), bits, from, payload_out);