mirror of
https://huihui.cat/mirrors/MikroTikPatch.git
synced 2025-12-10 03:24:37 +01:00
modified: patch.py
This commit is contained in:
parent
854354e3df
commit
eb24d0162f
1 changed files with 2 additions and 1 deletions
3
patch.py
3
patch.py
|
|
@ -106,7 +106,8 @@ def find_7zXZ_data(data:bytes):
|
||||||
|
|
||||||
def patch_elf(data: bytes,key_dict:dict):
|
def patch_elf(data: bytes,key_dict:dict):
|
||||||
initrd_xz = find_7zXZ_data(data)
|
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):
|
def patch_pe(data: bytes,key_dict:dict):
|
||||||
vmlinux_xz = find_7zXZ_data(data)
|
vmlinux_xz = find_7zXZ_data(data)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue