Created
February 4, 2018 05:59
-
-
Save burner1024/99d0ee19d170268430902a3a5a4fc4bb to your computer and use it in GitHub Desktop.
KeePassX bruteforcer, passwords generated from a few known base words and a few suffixes added at the end
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from pykeepass import PyKeePass | |
import sys | |
import itertools | |
#db file | |
f = 'db.kdbx' | |
#pwd bases | |
base = [ | |
'base1', | |
'base2', | |
'base3', | |
] | |
#suffix characters | |
chars = [ '!', '@', '3', '4', ] | |
suf = [] | |
#generate suffixes up to 4 characters long | |
for i in [1, 2, 3, 4]: | |
suf_cur = [''.join(i) for i in itertools.product(chars, repeat = i)] | |
suf = suf + suf_cur | |
pwds = [] | |
for b in base: | |
for s in suf: | |
pwds.append(b + s) | |
found = 0 | |
for p in pwds: | |
try: | |
db = PyKeePass(f, password=p) | |
print "Valid password found for %s : %s" % (f,p) | |
found = 1 | |
except: | |
if found == 1: | |
sys.exit(0) | |
print p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment