-
Notifications
You must be signed in to change notification settings - Fork 1
/
wardriver.sh
169 lines (140 loc) · 5.3 KB
/
wardriver.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
#!/bin/bash
#title :wardriver.sh
#description :The wardriver script is designed to make wardriving more efficient. This will utilize giskismet and kismet to create kml overlays.
#author :Seth Bare
#date :20141110
#version :0.3
#usage :Place in /usr/local/bin set to executable. Call from a terminal with ./wardriver.sh
#notes :Edit your Kismet.conf to reflect the directory ~/kismet_logs
#bash_version :4.1.5(1)-release
#Licensing Licensed under the GNU GPL V 3.0
#******************* Note you Must change the Kismet_logs variable to reflect the directory your kismet logs are stored in.******************
############ Variables ####################
RED=$(tput setaf 1 && tput bold)
GREEN=$(tput setaf 2 && tput bold)
STAND=$(tput sgr0)
BLUE=$(tput setaf 6 && tput bold)
Kismet_Logs="$(find /root/kismet_logs -name '*.netxml' )"
############## Begin script loop ########################
while :
do
############## Main Menu ####################
clear
echo $RED"#########################################"
echo "# $STAND The Wardriver $RED#"
echo "#########################################"
echo "# #"
echo "#$GREEN [1]$BLUE Begin Wardriving $RED#"
echo "#$GREEN [2]$BLUE Process a Wardrive $RED#"
echo "#$GREEN [3]$BLUE Create a KML overlay $RED #"
echo "#$GREEN [4]$BLUE Quit $RED #"
echo "# #"
echo "#########################################"
echo ""
echo ""
read -p $GREEN"Please choose an option?$STAND: " ChosenOption
echo
case $ChosenOption in
############## Begin [1]: Begin Wardriving ################
1)
clear
read -p $GREEN"Press [Enter] to launch the Kismet.$STAND"
xterm -geometry 111x24+650+0 -e kismet
echo ""
echo $RED"Please wait..."$STAND
sleep 1
echo ""
;;
########## End [1]: Begin Wardriving ######################
########## Begin [2]: Process a Wardrive ####################
2)
clear
echo $RED"Available Wardrive Files."
echo "########################"$STAND
echo ""
echo "$Kismet_Logs"
echo ""
read -p $GREEN"Please copy and paste the wardrive file from above you wish to process:" selected_file
cd /root/kismet_logs
xterm -geometry 111x24+650+0 -e giskismet -x $selected_file
echo ""
echo "Please wait"
sleep 1
echo ""
;;
############### End [2]: Process a Wardrive #################
############### Begin [3]: Create a KML Overlay ###################
3)
clear
echo "Create a KML overlay from your Wirelss Database."
echo ""
echo $GREEN"[1]$BLUE = All Wifi Networks."
echo $GREEN"[2]$BLUE = All Open Networks."
echo $GREEN"[3]$BLUE = All WEP Networks."
echo $GREEN"[4]$BLUE = All WPA Networks."
echo $GREEN"[5]$BLUE = A Specific Network Name."
echo $GREEN"[6]$BLUE = Return to Main Menu."
read -p $GREEN" Select an option 1-6?:$STAND " option
############# Start Option 1 ######################
if [[ $option == "1" ]]; then
read -p "What would you like to name this KML?" all_net
cd /root/kismet_logs
giskismet -q "select * from wireless" -o $all_net.kml
echo $RED"Press enter to continue"
read x
fi
########## End Option 1 ########################
########## Start Option 2 ######################
if [[ $option == "2" ]]; then
read -p "What would you like to name this KML?" open_net
cd /root/kismet_logs
giskismet -q "select * from wireless where Encryption='None'" -o $open_net.kml
echo $RED"Press enter to continue"
read x
fi
######## End Option 2 #########################
######## Start Option 3 #######################
if [[ $option == "3" ]]; then
read -p "What would you like to name this KML?" wep_net
cd /root/kismet_logs
giskismet -q "select * from wireless where Encryption='WEP'" -o $wep_net.kml
echo $RED"Press enter to continue"
read x
fi
######## End Option 3 #########################
######## Start Option 4 ##################################
if [[ $option == "4" ]]; then
read -p "What would you like to name this KML?" wpa_net
cd /root/kismet_logs
giskismet -q "select * from wireless where Encryption='WPA+PSK WPA+AES-CCM'" -o "$wpa_net"_PSK.kml
giskismet -q "select * from wireless where Encryption='WPA+TKIP WPA+PSK WPA+AES-CCM'" -o "$wpa_net"_TKIP.kml
mkdir /root/kismet_logs/"$wpa_net"
mv /root/kismet_logs/"$wpa_net"_PSK.kml /root/kismet_logs/"$wpa_net"
mv /root/kismet_logs/"$wpa_net"_TKIP.kml /root/kismet_logs/"$wpa_net"
echo $RED"Press enter to continue"
read x
fi
######## End Option 4 #####################################
######## Start Option 5 ###################################
if [[ $option == "5" ]]; then
read -p "What would you like to name this KML?" name_net
read -p "What is the name of the network you wish to map?" MAC
cd /root/kismet_logs
giskismet -q "select * from wireless where ESSID='$MAC'" -o $name_net.kml
echo $RED"Press enter to continue"
read x
fi
######### End option 5 ###########################
######### Start Option 6 #########################
;;
######### End Option 6 ###########################
############# Start: Selection 4 "quit" ###############################################################
4)
clear
echo $RED"Closing the program."
sleep 5
exit
;;
############ End: Selection 4 "quit" ###################################################################
esac
done