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
fe68e753c6
commit
d8f092eb80
2
patch.py
2
patch.py
@ -23,7 +23,7 @@ def replace_key(old,new,data,name=''):
|
|||||||
new_chunks = [bytes([new[i]]) for i in key_map]
|
new_chunks = [bytes([new[i]]) for i in key_map]
|
||||||
data = replace_chunks(old_chunks, new_chunks, data,name)
|
data = replace_chunks(old_chunks, new_chunks, data,name)
|
||||||
|
|
||||||
if 'ARCH' in os.environ and os.environ['ARCH'] == '-arm64':
|
if os.getenv('ARCH','') == '-arm64':
|
||||||
old_chunks = [old[i:i+4] for i in range(0, len(old), 4)]
|
old_chunks = [old[i:i+4] for i in range(0, len(old), 4)]
|
||||||
new_chunks = [new[i:i+4] for i in range(0, len(new), 4)]
|
new_chunks = [new[i:i+4] for i in range(0, len(new), 4)]
|
||||||
old_bytes = old_chunks[4] + old_chunks[5] + old_chunks[2] + old_chunks[0] + old_chunks[1] + old_chunks[6] + old_chunks[7]
|
old_bytes = old_chunks[4] + old_chunks[5] + old_chunks[2] + old_chunks[0] + old_chunks[1] + old_chunks[6] + old_chunks[7]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user