mirror of
https://github.com/elseif/MikroTikPatch
synced 2026-07-17 10:39:40 +00:00
modified: patch.py
This commit is contained in:
parent
55783f7975
commit
d0dc0620f9
4
patch.py
4
patch.py
@ -338,6 +338,10 @@ def patch_squashfs(path,key_dict):
|
||||
for file_path in [os.path.join(root, 'mode'),os.path.join(root, 'keyman')]:
|
||||
with open(file_path, 'rb') as f:
|
||||
data = f.read()
|
||||
for old_url,new_url in url_replacements.items():
|
||||
if old_url in data:
|
||||
print(f'{file_path} url patched {old_url.decode()[:7]}...')
|
||||
data = data.replace(old_url,new_url)
|
||||
modified = False
|
||||
for old_public_key,new_public_key in key_dict.items():
|
||||
new_data = replace_key(old_public_key,new_public_key,data,file_path)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user