Support Hex key for Crypt15

This commit is contained in:
KnugiHK
2022-02-22 18:59:04 +08:00
parent 0e6319eb4e
commit 08c5979eed
2 changed files with 29 additions and 10 deletions

View File

@@ -110,7 +110,7 @@ def main():
elif "crypt15" in options.backup:
crypt = Crypt.CRYPT15
if os.path.isfile(options.key):
key = open(options.key, "rb").read()
key = open(options.key, "rb")
elif all(char in string.hexdigits for char in options.key):
key = bytes.fromhex(options.key)
db = open(options.backup, "rb").read()