#!/usr/bin/python # Python port of keepass2john from the John the Ripper suite (http://www.openwall.com/john/) # ./keepass2john.c was written by Dhiru Kholia in March of 2012 # ./keepass2john.c was released under the GNU General Public License # source keepass2john.c source code from: http://fossies.org/linux/john/src/keepass2john.c # # Python port by @harmj0y, GNU General Public License # # TODO: handle keyfiles, test file inlining for 1.X databases, database version sanity check for 1.X # import sys import os import struct from binascii import hexlify def process_1x_database(data, databaseName, maxInlineSize=1024): index = 8 algorithm = -1 encFlag = struct.unpack("\n" % sys.argv[0]) sys.exit(-1) for i in range(1, len(sys.argv)): process_database(sys.argv[i])