From a1f1cebfb352da3a6a507762602364f77394ae7e Mon Sep 17 00:00:00 2001 From: danger Date: Sun, 27 Oct 2024 14:51:41 +0800 Subject: [PATCH] Upload files to "/" --- binary_patch.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/binary_patch.py b/binary_patch.py index c75c781..2616014 100644 --- a/binary_patch.py +++ b/binary_patch.py @@ -76,13 +76,10 @@ def patch_strcpy(nbytes, save_path, output=True): push rcx; push rdx; xor rcx, rcx; - loop: mov rdx, {nbytes-1}; - mov al, [rcx + rsi]; - - cmp rcx, rdx; - jge ret_code; - + mov byte ptr [rdx + rsi], 0; + loop: + mov al, [rsi + rcx]; test al, al; je ret_code; @@ -90,7 +87,7 @@ def patch_strcpy(nbytes, save_path, output=True): inc rcx; jmp loop; - + ret_code: mov [rsi + rcx], al; pop rdx;