Browse Source
Update patch.py
Signed-off-by: elseif <elseif@live.cn>
pull/110/head
elseif
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
patch.py
|
|
@ -10,7 +10,7 @@ def replace_chunks(old_chunks,new_chunks,data,name): |
|
|
def replace_match(match): |
|
|
def replace_match(match): |
|
|
replaced = b''.join([new_chunks[i] + match.group(i+1) for i in range(len(new_chunks) - 1)]) |
|
|
replaced = b''.join([new_chunks[i] + match.group(i+1) for i in range(len(new_chunks) - 1)]) |
|
|
replaced += new_chunks[-1] |
|
|
replaced += new_chunks[-1] |
|
|
print(f'{name} public key patched {b''.join(old_chunks)[:16].hex().upper()}...') |
|
|
|
|
|
|
|
|
print(f'{name} public key patched {b"".join(old_chunks)[:16].hex().upper()}...') |
|
|
return replaced |
|
|
return replaced |
|
|
return re.sub(pattern, replace_match, data) |
|
|
return re.sub(pattern, replace_match, data) |
|
|
|
|
|
|
|
|
|