From eb24d0162f47005a8143a4796407e9989902a367 Mon Sep 17 00:00:00 2001 From: zyb Date: Wed, 7 Aug 2024 09:50:19 +0800 Subject: [PATCH] modified: patch.py --- patch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/patch.py b/patch.py index da1b22a..97c3da9 100644 --- a/patch.py +++ b/patch.py @@ -106,7 +106,8 @@ def find_7zXZ_data(data:bytes): def patch_elf(data: bytes,key_dict:dict): initrd_xz = find_7zXZ_data(data) - return patch_initrd_xz(initrd_xz,key_dict) + new_initrd_xz = patch_initrd_xz(initrd_xz,key_dict) + return data.replace(initrd_xz,new_initrd_xz) def patch_pe(data: bytes,key_dict:dict): vmlinux_xz = find_7zXZ_data(data)