-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmake.py
220 lines (178 loc) · 7.14 KB
/
make.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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
#!/usr/bin/python3
import distro
import os
import time
from random import choice
try:
from art import *
from colorama import Fore, Style
except:
STYLE = '\033[33m[\033[31m!\033[33m]\033[00m'
print(STYLE+'\033[31m error : python \033[33mmodules\033[31m missing '+STYLE)
print(STYLE+'\033[31m run : \033[33mpip3 install -r requirements.txt\033[00m '+STYLE)
exit()
#VARIABLES
#COLORS
N = Style.RESET_ALL
R = Fore.RED
C = Fore.CYAN
G = Fore.GREEN
Y = Fore.YELLOW
B = Fore.BLUE
#Downloading required files
os.system('wget https://raw.githubusercontent.com/whoami-anoint/Probe/main/script/download.sh')
os.system('chmod +x download.sh')
os.system('bash download.sh')
os.system('rm download.sh')
#Directory variables
HOME_DIR = '/home'+'/'+os.listdir('/home')[0]+'/' #Go to home
DIR = '.probe' # Using a hidden directory to store all the required scripts
PROBE_PATH = os.path.join(HOME_DIR, DIR) #creating a path to make a directory
#File exists or not
BIN_CHECK = False #True means found in /bin and False means not found in /bin
GOBIN_CHECK = False #True means found in ~/go/bin and False means not found in ~/go/bin
#Banner
color = [N,R,C,G,Y,B]
arts = ['avatar','bigfig','chunky','contessa','cyberlarge',\
'cybermedium','cybersmall','italic','larry3d','lean','pepper','standard','straight','sub-zero','']
print(choice(color)+text2art('Probe',font=choice(arts)))
print(C+'.:.Everything you need as a'+Y+' Bug'+C+' hunter.:.'+N)
print('-------------------------------------------\n'*2)
time.sleep(.5)
#Linux Distro check; [Arch, Debian etc....]
DISTRO = distro.id()
print('['+G+'+'+N+'] Distro '+Y+DISTRO+N+' detected...'+N)
print('['+Y+'+'+N+'] Setting up '+Y+DISTRO+N+' package manager...')
time.sleep(0.5)
#Setting up package manager and GO package because installer is different
if 'arch' in DISTRO:
PKG_MNGR = 'yay -s'
GO = 'go'
else :
PKG_MNGR = 'sudo apt install '
GO = 'golang'
print('['+G+'+'+N+'] Package manager '+G+'setup'+N+' completed...')
time.sleep(.5)
#BSIC package checkups;
print('['+Y+'+'+N+'] Initilized '+Y+'Golang'+N+' check up ...')
time.sleep(.5)
#Golang check
if os.path.exists('/bin/go'):
print('['+G+'+'+N+'] Package already satisfied ...')
print(Y+'Skipping '+C+' Golang'+Y+' installation ....'+N)
time.sleep(.5)
else:
print('['+Y+'!'+N+'] Package missing ...')
print(Y+'Started '+C+' Golang'+Y+' installation ....')
os.system(PKG_MNGR +' '+GO)
print(G+'Golang installation completed ....'+N)
print('---------------------------------------------')
#Nmap check
print('['+Y+'+'+N+'] Initilized '+Y+'nmap'+N+' check up ...')
time.sleep(.5)
if os.path.exists('/bin/nmap'):
print('['+G+'+'+N+'] Package already satisfied ...')
print(Y+'Skipping '+C+' nmap'+Y+' installation ....'+N)
time.sleep(.5)
else:
print('['+Y+'!'+N+'] Package missing ...')
print(Y+'Started '+C+' Nmap'+Y+' installation ....')
os.system(PKG_MNGR + ' nmap')
print(G+'Nmap installation completed ....'+N)
print('---------------------------------------------')
if os.path.exists('/bin/pv'):
pass
else:
os.system(PKG_MNGR+' pv')
#Subfinder check
print('['+Y+'+'+N+'] Initilized '+Y+'subfinder'+N+' check up ...')
time.sleep(.5)
BIN_CHECK = os.path.exists('/bin/subfinder') #False means not found , True means found
if not BIN_CHECK:
GOBIN_CHECK = os.path.exists(HOME_DIR+'go/bin/subfinder') # False means not found , True means found
if GOBIN_CHECK :
os.system(f'sudo mv {HOME_DIR}go/bin/subfinder /bin')
else:
print('['+Y+'!'+N+'] Package missing ...')
print(Y+'Started '+C+' Subfinder'+Y+' installation ....')
os.system('go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest')
os.system(f'sudo mv {HOME_DIR}go/bin/subfinder /bin')
print(G+'subfinder installation completed ....'+N)
else :
print('['+G+'+'+N+'] Package already satisfied ...')
print(Y+'Skipping '+C+' subfinder'+Y+' installation ....'+N)
time.sleep(.5)
print('---------------------------------------------')
#Amasss check
print('['+Y+'+'+N+'] Initilized '+Y+'Amass'+N+' check up ...')
time.sleep(.5)
BIN_CHECK = os.path.exists('/bin/amass')
if not BIN_CHECK:
GOBIN_CHECK = os.path.exists(HOME_DIR+'go/bin/amass') # False means not found , True means found
if GOBIN_CHECK :
os.system(f'sudo mv {HOME_DIR}go/bin/amass /bin') # {HOME_DIR}go/bin/amass -> ~/go/bin/amass
else:
print('['+Y+'!'+N+'] Package missing ...')
print(Y+'Started '+C+' Amass'+Y+' installation ....')
os.system('go install -v github.com/OWASP/Amass/v3/...@master')
os.system(f'sudo mv {HOME_DIR}go/bin/amass /bin')
print(G+'amass installation completed ....'+N)
else:
print('['+G+'+'+N+'] Package already satisfied ...')
print(Y+'Skipping '+C+' Amass'+Y+' installation ....'+N)
time.sleep(.5)
print('---------------------------------------------')
#HTTPX check
print('['+Y+'+'+N+'] Initilized '+Y+'Httpx'+N+' check up ...')
time.sleep(.5)
BIN_CHECK = os.path.exists('/bin/httpx')
if not BIN_CHECK:
GOBIN_CHECK = os.path.exists(HOME_DIR+'go/bin/httpx') # False means not found , True means found
if GOBIN_CHECK :
os.system(f'sudo mv {HOME_DIR}go/bin/httpx /bin')
else:
print('['+Y+'!'+N+'] Package missing ...')
print(Y+'Started '+C+' Httpx'+Y+' installation ....')
os.system('go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest')
os.system(f'sudo mv {HOME_DIR}go/bin/httpx /bin')
print(G+'httpx installation completed ....'+N)
else:
print('['+G+'+'+N+'] Package already satisfied ...')
print(Y+'Skipping '+C+' HTTPX'+Y+' installation ....'+N)
time.sleep(.5)
print('---------------------------------------------')
#Waybackurls check
print('['+Y+'+'+N+'] Initilized '+Y+'waybackruls'+N+' check up ...')
time.sleep(.5)
BIN_CHECK = os.path.exists('/bin/waybackurls')
if not BIN_CHECK:
GOBIN_CHECK = os.path.exists(HOME_DIR+'go/bin/waybackurls') # False means not found , True means found
if GOBIN_CHECK :
os.system(f'sudo mv {HOME_DIR}go/bin/waybackurls /bin')
else:
print('['+Y+'!'+N+'] Package missing ...')
print(Y+'Started '+C+' Waybackurls'+Y+' installation ....')
os.system('go install github.com/tomnomnom/waybackurls@latest')
os.system(f'sudo mv {HOME_DIR}go/bin/waybackurls /bin')
print(G+'waybackurls installation completed ....'+N)
else:
print('['+G+'+'+N+'] Package already satisfied ...')
print(Y+'Skipping '+C+' WayBackUrls'+Y+' installation ....'+N)
time.sleep(.5)
print('---------------------------------------------')
BIN_CHECK = os.path.exists('/bin/gf')
if not BIN_CHECK:
os.system('chmod +x ~/.probe/script/gf.sh')
os.system('bash ~/.probe/script/gf.sh')
else:
pass
check = input('Enable notification [y/n]: ')
if str(check) == 'y' or str(check) =='Y' or str(check) == 'yes' or str(check) == 'Yes':
os.system('python3 ~/.probe/script/configNotification.py')
else:
pass
print('Hold on a second compiling the requirements of probe....')
time.sleep(1)
os.system('echo "Installation completed...." | pv -qL 20')
time.sleep(.5)
print(C+'>.< .:.Welcome to Probe.:. >.<')