1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-22 22:58:30 +00:00

Update sqlcipher2hashcat.py

This commit is contained in:
TROUNCE 2020-10-29 10:44:31 +00:00 committed by GitHub
parent 0bab388370
commit cfeb61238d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,17 @@
from base64 import b64encode
import sys
database = open(sys.argv[1], "rb").read(272)
salt = database[:16]
def usage():
print('./sqlcipher2hashcat DATABASE_FILE')
print('sqlcipherv4:256000:' + b64encode(salt).decode() + ':' + b64encode(database[16:272]).decode())
def main():
database = open(sys.argv[1], "rb").read(272)
salt = database[:16]
print('sqlcipherv4:256000:' + b64encode(salt).decode() + ':' + b64encode(database[16:272]).decode())
if __name__ == '__main__':
if len(sys.argv < 2):
usage()
else:
main()