指定源多播发送与抓包
|字数总计:4.1k|阅读时长:NaN:aN分钟|阅读量:
简单介绍下指定源多播发放的和抓取指定源多播数据的工具。
抓取指定源多播数据
安装
1 2 3 4 5
| sudo apt update && sudo apt install tcpdump -y
sudo apt update && sudo apt install -y termshark
sudo apt update && sudo apt install -y tshark
|
抓取
1 2 3 4 5 6 7 8 9
|
sudo tcpdump -nnX -i eth0 src host 172.20.177.107 and dst host 239.1.1.1 and udp port 5001
sudo termshark -i eth0 -Y "ip.src == 172.20.177.107 and ip.dst == 239.1.1.1 and udp.port == 5001"
sudo tshark -i eth0 -f "src host 172.20.177.107 and dst host 239.1.1.1 and udp port 5001"
|
发送指定源多播数据
安装
1
| sudo apt update && sudo apt install socat -y
|
发送
1 2 3 4 5 6
|
echo "hello, socat" | socat - UDP4-DATAGRAM:239.1.1.1:5001,bind=172.20.177.107
while true; do echo "Test Packet" | socat - UDP4-DATAGRAM:239.1.1.1:5001,bind=172.20.177.107; sleep 1; done
|