forked from Halcy0nic/SUBZero
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
23 lines (20 loc) · 1021 Bytes
/
install.sh
File metadata and controls
23 lines (20 loc) · 1021 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
sudo apt update && sudo apt upgrade
sudo apt install -y hostapd dnsmasq
sudo mkdir -p /var/www/SUBZero/ && sudo cp ./httpsServer.py /var/www/SUBZero && sudo cp wallpaper.jpg /var/www/SUBZero && openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes && sudo cp ./server.pem /var/www/SUBZero
chmod +x ./subzero.sh && sudo cp ./subzero.sh /usr/local/bin
(sudo crontab -l 2>/dev/null; echo "@reboot /usr/local/bin/subzero.sh") | crontab -
sudo mv /etc/dhcpcd.conf /etc/dhcpcd.bak
sudo mv /etc/dnsmasq.conf /etc/dnsmasq.bak
sudo mv /etc/hostapd/hostapd.conf /etc/hostapd/hostapd.bak
sudo mv /etc/network/interfaces /etc/network/interfaces.bak
sudo cp ./interfaces /etc/network/
sudo cp ./dhcpcd.conf /etc/
sudo cp ./dnsmasq.conf /etc/
sudo cp ./hostapd.conf /etc/hostapd/
echo "DAEMON_CONF=\"/etc/hostapd/hostapd.conf\"" | sudo tee -a /etc/default/hostapd
sudo systemctl unmask hostapd
sudo ldconfig
sudo systemctl enable hostapd
sudo systemctl start hostapd
sudo systemctl enable dnsmasq