-
Notifications
You must be signed in to change notification settings - Fork 2
/
adminfinder.py
51 lines (45 loc) · 1.38 KB
/
adminfinder.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
import pyfiglet
import requests
R = '\033[31m' # red
G = '\033[32m' # green
C = '\033[36m' # cyan
W = '\033[0m' # white
def Adminfinder():
url=input("Enter the URL to find a Admin panel : ")
path=input("Enter the path of a wordlist : ")
print("-"*50)
print("Scanning Target : ",url)
print("wordlist : ",path)
print("-"*50)
print("[+] parsing the wordlist.....")
try:
with open(path) as file:
check=file.read().strip().split("\n")
print(G+"[+] PARSING DONE ")
print(G+"[+] TOTAL PATHS TO BE CHECK : ",str(len(check)))
except IOError:
print(R+'[+] FAILED')
print(R+'[+] Failed to read the wordlist specified')
sys.exit(1)
def checkpath(cp):
u='http://'+url+'/'+cp
#print (u)
try:
r = requests.head(u)
code=r.status_code
except requests.ConnectionError:
print(R+"failed to connect")
if(code == 200 ):
print(G+"[Found]",u)
else:
print(R+'[-]',u)
print(G+"[+] Begin scanning....")
for i in range(len(check)):
#print(check[i])
checkpath(check[i])
print(G+'\n Scan complete....')
ban=pyfiglet.figlet_format("ADMIN FIND3R",font="slant")
print(ban)
print( ' created by - Ramalingasamy M K')
print()
Adminfinder()