feat: simple results check

modder2
Mikhail Yudin 2023-06-03 10:37:40 +07:00
rodzic d8c9b99e72
commit d5f2fcf9f7
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -37,8 +37,12 @@ def main(encrypted_file_path):
eprint('new:', new_value)
decrypted = decrypted[:addr] + int(new_value).to_bytes(4, 'little') + decrypted[addr+4:]
encrypted = encrypt(decrypted, version)
if len(file_bytes) != len(encrypted):
eprint('Something goes wrong. Check values or open issue.')
exit(255)
os.write(1, encrypted)