Last active
April 20, 2023 03:27
-
-
Save ericjster/619d65e6ec011bc47f844aa6a331acdd to your computer and use it in GitHub Desktop.
keepass python
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
import pykeepass # pip install pykeepass | |
import construct | |
prefixes = [ | |
"abc", | |
"def", | |
] | |
mids = [ | |
"1", | |
"2", | |
"3", | |
] | |
postfixes = [ | |
"x", | |
"y", | |
] | |
f = "test.kdbx" | |
for prefix in prefixes: | |
for mid in mids: | |
for postfix in postfixes: | |
pwd = f"{prefix}{mid}{postfix}" | |
print(pwd, end=' ', flush=True) | |
try: | |
kp = pykeepass.PyKeePass(f, password=pwd) | |
print(f"***** SUCCESS: {pwd}") | |
except construct.core.ChecksumError: | |
pass | |
except pykeepass.exceptions.CredentialsError: | |
pass | |
print() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment