-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·29 lines (24 loc) · 1002 Bytes
/
Copy pathsetup.sh
File metadata and controls
executable file
·29 lines (24 loc) · 1002 Bytes
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
#!/usr/bin/env bash
set -euo pipefail
echo "[+] Installing system dependencies (Ubuntu)..."
sudo apt-get update
sudo apt-get install -y python3 python3-pip python3-dev libpcap-dev tcpdump iptables build-essential
echo "[+] Installing Python requirements..."
pip3 install -r requirements.txt
echo "[+] Preparing logs/data directories..."
mkdir -p logs data
echo "[+] (Optional) Grant Python packet capture capabilities"
PY3=$(which python3 || true)
if [ -n "${PY3}" ]; then
sudo setcap cap_net_raw,cap_net_admin+eip "${PY3}" || true
fi
echo "[+] Done. You may need to re-login for capability/group changes to take effect."
echo ""
echo "To run the system:"
echo " python3 main.py --list-interfaces"
echo " python3 main.py -i eth0 --mode integrated"
echo " python3 main.py -i lo --mode integrated # For testing on loopback"
echo ""
echo "Individual components:"
echo " python3 path_monitor/path_monitor.py -i eth0 -t 60"
echo " python3 ddos_defense/ddos_defense.py -i eth0 -t 300"