# Kali/WSL: install local tools
sudo apt update
sudo apt install -y tcpdump curl python3
# Terminal 1: start a local service
python3 -m http.server 8080 --bind 127.0.0.1
# Terminal 2: inspect interfaces and capture; Ctrl+C after request
sudo tcpdump -D
sudo tcpdump -i lo -nn -w lab-capture.pcap 'tcp port 8080 and host 127.0.0.1'
# Terminal 3: generate only your own local request
curl --max-time 5 http://127.0.0.1:8080/
# Terminal 2: Ctrl+C, then read saved file
sudo tcpdump -nn -r lab-capture.pcap 'tcp port 8080'
# Stop the server with Ctrl+C in terminal 1.
