forked from shiblisec/Rekon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
160 lines (142 loc) · 8.5 KB
/
main.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
import subprocess
import argparse
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKCYAN = '\033[96m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
print(bcolors.OKCYAN+bcolors.UNDERLINE+"""
███╗ ██╗███████╗██╗ ██╗████████╗██████╗ ██████╗ ███╗ ██╗███████╗███████╗ ██████╗
████╗ ██║██╔════╝██║ ██║╚══██╔══╝██╔══██╗██╔═══██╗████╗ ██║██╔════╝██╔════╝██╔════╝
██╔██╗ ██║█████╗ ██║ ██║ ██║ ██████╔╝██║ ██║██╔██╗ ██║███████╗█████╗ ██║
██║╚██╗██║██╔══╝ ██║ ██║ ██║ ██╔══██╗██║ ██║██║╚██╗██║╚════██║██╔══╝ ██║
██║ ╚████║███████╗╚██████╔╝ ██║ ██║ ██║╚██████╔╝██║ ╚████║███████║███████╗╚██████╗
╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝╚══════╝ ╚═════╝
--v0.3--
"""+bcolors.ENDC)
#Add your NeutronSec Path
path="~/Tools/NeutronSec"
parser = argparse.ArgumentParser()
parser.add_argument("-m1", "--mode1",action='store_true',help = "Mode 1: Enum + Nuclei")
parser.add_argument("-m2", "--mode2",action='store_true',help = "Mode 2: Enum + Dirsearch + Nuclei")
parser.add_argument("-m3", "--mode3",action='store_true',help = "Mode 3: Enum + Extra.sh +Nuclei")
parser.add_argument("-m4", "--mode4",action='store_true',help = "Mode 4: Enum + NMap + Nuclei")
parser.add_argument("-y", "--batch",action='store_true',help = "Batch: With all options set as YES")
args = parser.parse_args()
dom = input(bcolors.BOLD+bcolors.FAIL+"Enter Domain:-)"+bcolors.ENDC)
def mode1():
print(bcolors.BOLD+bcolors.OKBLUE+"Now Starting Enumeration + Nuclei"+bcolors.ENDC)
subprocess.call(path+"./enum.sh -d "+dom, shell=True)
subprocess.call(path+"./nuclei.sh -d "+dom, shell=True)
def mode2():
print(bcolors.BOLD+bcolors.OKBLUE+"Now Starting Enumeration + Dirsearch + Nuclei"+bcolors.ENDC)
subprocess.call(path+"./enum.sh -d "+dom, shell=True)
subprocess.call(path+"./dirb.sh -d "+dom, shell=True)
subprocess.call(path+"./nuclei.sh -d "+dom, shell=True)
def mode3():
print(bcolors.BOLD+bcolors.OKBLUE+"Now Starting Enumeration + Extra.sh + Nuclei"+bcolors.ENDC)
subprocess.call(path+"./enum.sh -d "+dom, shell=True)
subprocess.call(path+"./extra.sh -d "+dom, shell=True)
subprocess.call(path+"./nuclei.sh -d "+dom, shell=True)
def mode4():
print(bcolors.BOLD+bcolors.OKBLUE+"Now Starting Enumeration + Nuclei + NMap"+bcolors.ENDC)
subprocess.call(path+"./enum.sh -d "+dom, shell=True)
subprocess.call(path+"./nuclei.sh -d "+dom, shell=True)
subprocess.call(path+"./nmap.sh -d "+dom, shell=True)
def batch():
print(bcolors.BOLD+bcolors.OKBLUE+"Now Starting Argument-less execution"+bcolors.ENDC)
print(bcolors.BOLD+bcolors.OKCYAN+"Gathering Subdomains"+bcolors.ENDC)
subprocess.call(path+"./enum.sh -d "+dom, shell=True)
subprocess.call(path+"./response.sh -d "+dom, shell=True)
print(bcolors.BOLD+bcolors.OKCYAN+"Gathering JS Files"+bcolors.ENDC)
subprocess.call(path+"./jsfiles.sh -d "+dom, shell=True)
print(bcolors.BOLD+bcolors.OKCYAN+"Extracting Endpoints"+bcolors.ENDC)
subprocess.call(path+"./endpoints.sh -d "+dom, shell=True)
print(bcolors.BOLD+bcolors.OKCYAN+"Checking S3 Buckets"+bcolors.ENDC)
subprocess.call(path+"./s3find.sh -d "+dom, shell=True)
subprocess.call(path+"./sto.sh -d "+dom, shell=True)
print(bcolors.BOLD+bcolors.OKCYAN+"Creating a Custom Wordlist for you :]"+bcolors.ENDC)
subprocess.call(path+"./wordlist.sh -d "+dom, shell=True)
print(bcolors.BOLD+bcolors.OKCYAN+"Testing for PUT method"+bcolors.ENDC)
subprocess.call(path+"./puttest.sh "+dom, shell=True)
print(bcolors.BOLD+bcolors.OKCYAN+"Performing Wayback|GAU|GF Patterns"+bcolors.ENDC)
subprocess.call(path+"./extra.sh -d "+dom, shell=True)
print(bcolors.BOLD+bcolors.OKCYAN+"Performing Screenshots"+bcolors.ENDC)
subprocess.call(path+"./screenshot.sh -d "+dom, shell=True)
print(bcolors.BOLD+bcolors.OKCYAN+"Running Nmap "+bcolors.ENDC)
subprocess.call(path+"./nmap.sh -d "+dom, shell=True)
print(bcolors.BOLD+bcolors.OKCYAN+"Performing Nuclei"+bcolors.ENDC)
subprocess.call(path+"./nuclei.sh -d "+dom, shell=True)
print(bcolors.BOLD+bcolors.OKCYAN+"Performing Directory BruteForcing"+bcolors.ENDC)
subprocess.call(path+"./dirb.sh -d "+dom, shell=True)
if args.mode1:
mode1()
elif args.mode2:
mode2()
elif args.mode3:
mode3()
elif args.mode4:
mode4()
elif args.batch:
batch()
else:
print(bcolors.BOLD+bcolors.OKBLUE+"Now Starting"+bcolors.ENDC)
print(bcolors.BOLD+bcolors.OKCYAN+"Gathering Subdomains"+bcolors.ENDC)
subprocess.call(path+"./enum.sh -d "+dom, shell=True)
subprocess.call(path+"./response.sh -d "+dom, shell=True)
print(bcolors.BOLD+bcolors.OKCYAN+"Gathering JS Files"+bcolors.ENDC)
subprocess.call(path+"./jsfiles.sh -d "+dom, shell=True)
print(bcolors.BOLD+bcolors.OKCYAN+"Extracting Endpoints"+bcolors.ENDC)
subprocess.call(path+"./endpoints.sh -d "+dom, shell=True)
print(bcolors.BOLD+bcolors.OKCYAN+"Checking S3 Buckets"+bcolors.ENDC)
subprocess.call(path+"./s3find.sh -d "+dom, shell=True)
print(bcolors.BOLD+bcolors.OKCYAN+"Checking for Possible Subdomain Takeovers"+bcolors.ENDC)
subprocess.call(path+"~/Desktop/Neutron/NeutronSec/./sto.sh -d "+dom, shell=True)
print(bcolors.BOLD+bcolors.OKCYAN+"Creating a Custom Wordlist for you :]"+bcolors.ENDC)
subprocess.call(path+"./wordlist.sh -d "+dom, shell=True)
print(bcolors.BOLD+bcolors.OKCYAN+"Testing for PUT method"+bcolors.ENDC)
subprocess.call(path+"./puttest.sh "+dom, shell=True)
print(bcolors.BOLD+bcolors.OKCYAN+"Performing Wayback|GAU|GF Patterns"+bcolors.ENDC)
subprocess.call(path+"./extra.sh -d "+dom, shell=True)
x = input(bcolors.BOLD+bcolors.WARNING+"Perform Screenshots? (y/n): "+bcolors.ENDC).lower()
if x == "y":
subprocess.call(path+"./screenshot.sh -d "+dom, shell=True)
else:
exit
y = input(bcolors.BOLD+bcolors.WARNING+"Perform NMap ? (y/n): "+bcolors.ENDC).lower()
if y == "y":
subprocess.call(path+"./nmap.sh -d "+dom, shell=True)
else:
exit
z = input(bcolors.BOLD+bcolors.WARNING+"Perform Nuclei? (y/n): "+bcolors.ENDC).lower()
if z == "y":
subprocess.call(path+"./nuclei.sh -d "+dom, shell=True)
else:
exit
print('''
▄ ▄
▌▒█ ▄▀▒▌
▌▒▒█ ▄▀▒▒▒▐
▐▄█▒▒▀▀▀▀▄▄▄▀▒▒▒▒▒▐
▄▄▀▒▒▒▒▒▒▒▒▒▒▒█▒▒▄█▒▐
▄▀▒▒▒░░░▒▒▒░░░▒▒▒▀██▀▒▌
▐▒▒▒▄▄▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▀▄▒▌
▌░░▌█▀▒▒▒▒▒▄▀█▄▒▒▒▒▒▒▒█▒▐
▐░░░▒▒▒▒▒▒▒▒▌██▀▒▒░░░▒▒▒▀▄▌
▌░▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░▒▒▒▒▌
▌▒▒▒▄██▄▒▒▒▒▒▒▒▒░░░░░░░░▒▒▒▐
▐▒▒▐▄█▄█▌▒▒▒▒▒▒▒▒▒▒░▒░▒░▒▒▒▒▌
▐▒▒▐▀▐▀▒▒▒▒▒ ▒▒▒▒▒▒▒░▒░▒░▒▒▐
▌▒▒▀▄▄▄▄▄▄█▒▒▒▒▒▒▒░▒░▒░▒▒▒▌
▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░▒░▒▒▄▒▒▐
▀▄▒▒▒▒▒▒▒▒▒▒▒▒▒░▒░▒▄▒▒▒▒▌
▀▄▒▒▒▒▒▒▒▒▒▒▄▄▄▀▒▒▒▒▄▀
▀▄▄▄▄▄▄▀▀▀▒▒▒▒▒▄▄▀
▀▀▀▀▀▀▀▀▀▀▀▀
''')
print("\n"+bcolors.BOLD+bcolors.OKGREEN+"--------------------------------------"+bcolors.ENDC+"\n"+bcolors.BOLD+bcolors.FAIL+"Script Ended, but not your Hamcking :}"+bcolors.ENDC)