decrypt-signal-sql-key/decrypt_from_keys.py

20 lines
618 B
Python

import sys
from decrypt_api import *
if __name__ == "__main__":
if len(sys.argv) != 3:
print("Pass the filename of the OS master key value (key is in the Signal local state file) and the filename of the config encrypted key value (config.json); see the appdata version if confused")
exit(1)
os_key_filename = sys.argv[1]
config_key_filename = sys.argv[2]
with open(os_key_filename, "r") as f:
os_key_b64 = f.read().strip()
with open(config_key_filename, "r") as f:
config_key_hex = f.read().strip()
decrypt_and_print_cipher_key(os_key_b64, config_key_hex)