refactor
Mikhail Yudin 2023-06-10 23:57:14 +07:00
rodzic d2a03f3b80
commit e8862a50aa
3 zmienionych plików z 5 dodań i 5 usunięć

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -4,7 +4,7 @@ import os
from pathlib import Path from pathlib import Path
from sys import argv from sys import argv
from lib.uvk5 import eprint, encrypt, decrypt from uvk5 import eprint, encrypt, decrypt
def usage(info = None): def usage(info = None):

Wyświetl plik

@ -7,13 +7,13 @@ V_START = 8192
def main(): def main():
if len(argv) != 3: if len(argv) != 3:
print(f'Usage: {argv[0]} <search_string> decrypted_file.bin') print(f'Usage: {argv[0]} decrypted_file.bin <search_string>')
exit(128) exit(128)
search_for = argv[1].encode() data = Path(argv[1]).read_bytes()
data = Path(argv[2]).read_bytes() search_for = argv[2].encode()
if data[V_START:V_START+4] != b'2.01': if data[:4] != b'\x88\x13\x00\x20':
print('Encrypted file, choose decrypted.') print('Encrypted file, choose decrypted.')
exit(200) exit(200)