Last active
January 3, 2020 12:22
-
-
Save GanbaruTobi/87bd96e7810859cbba685744363fa322 to your computer and use it in GitHub Desktop.
keepass unsupported version slow bruteforce
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/env python3 | |
import pexpect | |
with open('Passwords.txt') as passwords: | |
for password in passwords: | |
p = pexpect.spawn('/bin/bash -c "keepassxc-cli open test.kdbx"') | |
p.expect("Enter password to unlock") | |
p.sendline(password) | |
p.timeout = 2 | |
try: | |
p.expect("Error while") | |
p.close() | |
except : | |
print(password + " is correct") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment