forked from h3llk4t3/autoScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautoScript.sh
More file actions
282 lines (255 loc) · 5.1 KB
/
autoScript.sh
File metadata and controls
282 lines (255 loc) · 5.1 KB
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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
#!/usr/bin/env bash
source "lib/main-lib.sh"
interface-check() {
if [ -z $INTERFACE ]
then
echo ""
echo ""
echo "Not an Option"
sleep 2
moniter-mode
fi
}
interface-error-check() {
if [ -z $INTERFACE ]
then
echo ""
echo "Error Network Adapter Not Valid"
sleep 2
moniter-mode
fi
}
moniter-mode() {
clear
figlet WiFi Interface
echo -e "\e[0;36m---------------------\e[0m \e[1;33mChoose a Network Adapter\e[0m \e[0;36m---------------------\e[0m"
echo ""
echo -e "\e[1;31mWARNING:\e[0m Try and avoid using wlan0"
iwconfig > temp.txt 2>/dev/null
cat temp.txt | grep "IEEE" | cut -d' ' -f1 > iwconfig.txt
mapfile -t interface <iwconfig.txt
rm temp.txt
rm iwconfig.txt
echo ""
if [ ! -z ${interface[0]} ]
then
echo "1) ${interface[0]}"
else
echo ""
echo "No Network Adapters Found!"
sleep 2
main-choice-1
fi
if [ ! -z ${interface[1]} ]
then
echo "2) ${interface[1]}"
fi
if [ ! -z ${interface[2]} ]
then
echo "3) ${interface[2]}"
fi
if [ ! -z ${interface[3]} ]
then
echo "4) ${interface[3]}"
fi
if [ ! -z ${interface[4]} ]
then
echo "5) ${interface[4]}"
fi
if [ ! -z ${interface[5]} ]
then
echo "6) ${interface[5]}"
fi
if [ ! -z ${interface[6]} ]
then
echo "7) ${interface[6]}"
fi
if [ ! -z ${interface[7]} ]
then
echo "8) ${interface[7]}"
fi
if [ ! -z ${interface[8]} ]
then
echo "9) ${interface[8]}"
fi
echo ""
echo "0) Exit"
echo ""
read -n 1 -p "Select Option: " INTERFACE
if [ -z $INTERFACE ]
then
echo ""
echo "Cannot leave blank"
sleep 2
moniter-mode
elif [ $INTERFACE == 1 ]
then
INTERFACE=${interface[0]}
interface-check
elif [ $INTERFACE == 2 ]
then
INTERFACE=${interface[1]}
interface-check
elif [ $INTERFACE == 3 ]
then
INTERFACE=${interface[2]}
interface-check
elif [ $INTERFACE == 4 ]
then
INTERFACE=${interface[3]}
interface-check
elif [ $INTERFACE == 5 ]
then
INTERFACE=${interface[4]}
interface-check
elif [ $INTERFACE == 6 ]
then
INTERFACE=${interface[5]}
interface-check
elif [ $INTERFACE == 7 ]
then
INTERFACE=${interface[6]}
interface-check
elif [ $INTERFACE == 8 ]
then
INTERFACE=${interface[7]}
interface-check
elif [ $INTERFACE == 9 ]
then
INTERFACE=${interface[8]}
interface-check
elif [ $INTERFACE == 0 ]
then
cd "$START_DIR"
clear
exit
else
echo ""
echo ""
echo "Not an Option"
sleep 2
moniter-mode
fi
clear
echo "Processing..."
interface-error-check
}
main-menu() {
heading
echo -e "\e[0;36m---------------\e[0m \e[1;33mMade by Treebug842\e[0m \e[0;36m---------------\e[0m"
echo ""
echo "1) WiFi Cracking"
echo "2) Network Recon"
echo "3) DOS Attacks"
echo "4) Other Options"
echo "5) Exit"
echo ""
read -n 1 -p "Select Option: " MAIN
if [ -z $MAIN ]
then
echo ""
echo "Cannot leave blank"
sleep 2
main-menu
elif [ $MAIN == 1 ]
then
main-choice-1
elif [ $MAIN == 2 ]
then
main-choice-2
elif [ $MAIN == 3 ]
then
main-choice-3
elif [ $MAIN == 4 ]
then
main-choice-4
elif [ $MAIN == 5 ]
then
cd "$START_DIR"
clear
exit
else
echo ""
echo ""
echo "Not an Option"
sleep 2
main-menu
fi
}
license-edit() {
clear
cat EULA.txt | cut -d"-" -f1
read -p "-Do you agree with the above conditions (yes/no): " USER_INPUT
if [ -z $USER_INPUT ]
then
echo ""
echo "You cannot leave blank"
sleep 2
license-edit
elif [ "$USER_INPUT" == "no" ]
then
echo ""
echo "You must agree to the EULA before you are able to use autoScript"
sleep 2
clear
exit
elif [ "$USER_INPUT" == "yes" ]
then
sed -i '$ d' EULA.txt
echo "-Do you agree with the above conditions (yes/no): yes" >> EULA.txt
else
echo ""
echo "Option not supported"
sleep 2
license-edit
fi
}
license-check() {
clear
cd $PERM_DIR
ANSWER=$(cat EULA.txt | grep ":" | cut -d":" -f2)
if [ "$ANSWER" == " no" ]
then
echo "You must agree to the EULA first"
sleep 2
license-edit
elif [ "$ANSWER" == " yes" ]
then
echo ""
#License check passed
else
echo ""
echo "Invalid answer written in autoScript EULA"
echo "Answer must not contain capital letters"
echo ""
read -n 1 -r -s
exit
fi
cd "$START_DIR"
}
verification() {
EULA_CHECKSUM=$(sha256sum EULA.txt | cut -d" " -f1)
LICENSE_CHECKSUM=$(sha256sum LICENSE.txt | cut -d" " -f1)
if [ "$EULA_CHECKSUM" != "afd5444ad9e322e566c97d9a88cf3f1ad7704615b2d3f28a633766fa1c628c3f" ]
then
echo "The EULA file has been tampered with!"
sleep 2
clear
cd "$START_DIR"
exit
fi
if [ "$LICENSE_CHECKSUM" != "605e9047a563c5c8396ffb18232aa4304ec56586aee537c45064c6fb425e44ad" ]
then
echo "The LICENSE file has been tampered with!"
sleep 2
clear
cd "$START_DIR"
exit
fi
}
START_DIR=$(pwd)
license-check
verification
moniter-mode
clear
main-menu