-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient_script.sh
63 lines (51 loc) · 1.3 KB
/
client_script.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
#!/bin/bash
echo " Settings for DHCPLOK client"
echo "Do you want to install all required packages for dhcplok client?(yes/no)"
read input
if [ "$input" == "yes" ]
then
if [ "$(id -u)" != 0 ]; then
echo "This script must be run as root" >&2
exit 1
else
#Update and Upgrade
echo "Updating and Upgrading..."
apt-get update && sudo apt-get upgrade -y
#Install Net-Tools
echo "Installing Net-Tools..."
apt install -y net-tools
#Install Wireshark
echo "Installing Wireshark..."
apt install -y wireshark
#Install Dnsmasq
echo "Installing DnsMasq..."
apt install -y dnsmasq
apt install software-properties-common
add-apt-repository ppa:deadsnakes/ppa
apt update
#Install Python3.8
echo "Installing Python3.8..."
apt install python3.8
python3 ––version
#Install Python3-pip
echo "Installing Python3-pip..."
apt install python3-pip
pip3 --version
#Install scapy
echo "Installing scapy..."
pip3 install scapy
sudo apt-get install python3-scapy
fi
fi
echo "All network interfaces:"
ifconfig -a
echo "Do you want to get IP address from DHCP server?(yes/no)"
read input
if [ "$input" == "yes" ]
then
read -p 'Interface for DHCP client: ' interfacevar
sudo dhclient $interfacevar
fi
echo "All network interfaces:"
ifconfig -a
echo" The end"