-
Notifications
You must be signed in to change notification settings - Fork 165
/
setup.sh
executable file
·197 lines (191 loc) · 5.65 KB
/
setup.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
#!/bin/bash
if lsb_release -d | grep -q "Kali"
then
Release=Kali
apt-get update -y
apt-get install -y dnsmasq libssl1.0-dev libnfnetlink-dev libnl-genl-3-dev wireshark tcpdump python-setuptools ca-certificates git make wget gcc pkg-config libnl-3-dev easy_install pip
pushd module/Auto_EAP/
python RunMeFirst.py
popd
pushd module/
wget ftp://ftp.freeradius.org/pub/radius/old/freeradius-server-2.1.12.tar.bz2
tar -jxvf freeradius-server-2.1.12.tar.bz2
mv freeradius-server-2.1.12 freeradius
rm -rf freeradius-server-2.1.12.tar.bz2
pushd freeradius
patch -p1 < ../gtc/PuNk1n.patch
./configure
make
make install
ldconfig
mv /usr/local/etc/raddb/eap.conf /usr/local/etc/raddb/eap.conf.bak
mv ../gtc/eap.conf /usr/local/etc/raddb/eap.conf
mv /usr/local/etc/raddb/clients.conf /usr/local/etc/raddb/clients.conf.bak
mv ../gtc/clients.conf /usr/local/etc/raddb/clients.conf
popd
wget https://w1.fi/releases/hostapd-2.6.tar.gz
tar -xzf hostapd-2.6.tar.gz
mv hostapd-2.6/ hostapd/
rm -rf hostapd-2.6.tar.gz
pushd hostapd/
patch -p1 < ../hostapd-wpe/hostapd-wpe.patch
pushd hostapd
make
popd
popd
pushd hostapd-wpe/certs
./bootstrap
popd
popd
elif lsb_release -d | grep -q "Ubuntu"
then
Release=Ubuntu
apt-get update -y
apt-get install -y dnsmasq libssl-dev libnfnetlink-dev libnl-genl-3-dev wireshark tcpdump python-setuptools ca-certificates git make wget gcc pkg-config libnl-3-dev
easy_install pip
pushd module/Auto_EAP/
python RunMeFirst.py
popd
pushd module/
pushd module/Auto_EAP/
python RunMeFirst.py
popd
pushd module/
wget ftp://ftp.freeradius.org/pub/radius/old/freeradius-server-2.1.12.tar.bz2
tar -jxvf freeradius-server-2.1.12.tar.bz2
mv freeradius-server-2.1.12 freeradius
rm -rf freeradius-server-2.1.12.tar.bz2
pushd freeradius
patch -p1 < ../gtc/PuNk1n.patch
./configure
make
make install
ldconfig
mv /usr/local/etc/raddb/eap.conf /usr/local/etc/raddb/eap.conf.bak
mv ../gtc/eap.conf /usr/local/etc/raddb/eap.conf
mv /usr/local/etc/raddb/clients.conf /usr/local/etc/raddb/clients.conf.bak
mv ../gtc/clients.conf /usr/local/etc/raddb/clients.conf
popd
wget https://w1.fi/releases/hostapd-2.6.tar.gz
tar -xzf hostapd-2.6.tar.gz
mv hostapd-2.6/ hostapd/
rm -rf hostapd-2.6.tar.gz
pushd hostapd/
patch -p1 < ../hostapd-wpe/hostapd-wpe.patch
pushd hostapd
make
popd
popd
pushd hostapd-wpe/certs
./bootstrap
popd
popd
elif lsb_release -d | grep -q "Gentoo"
then
Release=Gentoo
emerge --sync
emerge --oneshot portage
emerge net-dns/dnsmasq dev-vcs/git net-misc/wget net-analyzer/wireshark net-analyzer/tcpdump app-misc/ca-certificates sys-devel/make sys-devel/gcc dev-util/pkgconfig dev-libs/libnl dev-python/setuptools net-libs/libnfnetlink dev-libs/openssl dev-python/pip
pushd module/Auto_EAP/
python RunMeFirst.py
popd
pushd module/
pushd module/Auto_EAP/
python RunMeFirst.py
popd
pushd module/
wget ftp://ftp.freeradius.org/pub/radius/old/freeradius-server-2.1.12.tar.bz2
tar -jxvf freeradius-server-2.1.12.tar.bz2
mv freeradius-server-2.1.12 freeradius
rm -rf freeradius-server-2.1.12.tar.bz2
pushd freeradius
patch -p1 < ../gtc/PuNk1n.patch
./configure
make
make install
ldconfig
mv /usr/local/etc/raddb/eap.conf /usr/local/etc/raddb/eap.conf.bak
mv ../gtc/eap.conf /usr/local/etc/raddb/eap.conf
mv /usr/local/etc/raddb/clients.conf /usr/local/etc/raddb/clients.conf.bak
mv ../gtc/clients.conf /usr/local/etc/raddb/clients.conf
popd
wget https://w1.fi/releases/hostapd-2.6.tar.gz
tar -xzf hostapd-2.6.tar.gz
mv hostapd-2.6/ hostapd/
rm -rf hostapd-2.6.tar.gz
pushd hostapd/
patch -p1 < ../hostapd-wpe/hostapd-wpe.patch
pushd hostapd
make
popd
popd
pushd hostapd-wpe/certs
./bootstrap
popd
popd
elif lsb_release -d | grep -q "Debian"
then
Release=Debian
apt-get update -y
apt-get install -y dnsmasq libssl1.0-dev libnfnetlink-dev libnl-genl-3-dev build-essential gcc wireshark tcpdump python-setuptools ca-certificates git make wget libnl-3-dev pkg-config
easy_install pip
pushd module/Auto_EAP/
python RunMeFirst.py
popd
pushd module/
pushd module/Auto_EAP/
python RunMeFirst.py
popd
pushd module/
wget ftp://ftp.freeradius.org/pub/radius/old/freeradius-server-2.1.12.tar.bz2
tar -jxvf freeradius-server-2.1.12.tar.bz2
mv freeradius-server-2.1.12 freeradius
rm -rf freeradius-server-2.1.12.tar.bz2
pushd freeradius
patch -p1 < ../gtc/PuNk1n.patch
./configure
make
make install
ldconfig
mv /usr/local/etc/raddb/eap.conf /usr/local/etc/raddb/eap.conf.bak
mv ../gtc/eap.conf /usr/local/etc/raddb/eap.conf
mv /usr/local/etc/raddb/clients.conf /usr/local/etc/raddb/clients.conf.bak
mv ../gtc/clients.conf /usr/local/etc/raddb/clients.conf
popd
wget https://w1.fi/releases/hostapd-2.6.tar.gz
tar -xzf hostapd-2.6.tar.gz
mv hostapd-2.6/ hostapd/
rm -rf hostapd-2.6.tar.gz
pushd hostapd/
patch -p1 < ../hostapd-wpe/hostapd-wpe.patch
pushd hostapd/
make
popd
popd
pushd hostapd-wpe/certs
./bootstrap
popd
popd
else
echo -ne "Unknown/Unsupported Distro\n"
echo -ne "Quiting...\n"
exit 1
fi
rm -rf db/.keep
echo -ne "Below are is the contents of the requirement, if you wish to install them please enter yes. Note that SniffAir will not run properly without them.\n"
echo -ne "[*] pandas\n"
echo -ne "[*] logging\n"
echo -ne "[*] PrettyTable\n"
echo -ne "[*] tabulate\n"
echo -ne "[*] scapy\n"
echo -ne "[*] gmplot\n"
echo -ne "[*] requests\n"
echo -n "Do you wish to install these python modules? [y/n]"
read answer
if echo "$answer" | grep -iq "^y" ;then
pip2 install -r requirements.txt --user
echo -e "[+]All Dependencies installed. Run SniffAir.py to use SniffAir\n"
else :
echo -e "[-] ERROR: Dependencies not installed. SniffAir will not be able to run until they are installed\n"
exit 1
fi