Linux发送UDP报文
echo "hello" | socat - udp4-datagram:192.168.31.229:8011apt install socattcpdump -D 获取网络适配器列表,以下是在Ubuntu上获取到的结果:
tcpdump -i <需要监控的网络适配器编号>,例如我想监控我的无线网卡wlan0,则使用tcpdump -i 2。
使用无线网卡wlan0监控IP地址为172.16.86.111上443端口的tcp协议: tcpdump -i 2 host 172.16.86.111 and tcp port 443
如果想要显示数据包的内容,需要使用-X参数,如,我想要显示捕获的https数据包http header的内容: tcpdump -X -i 2 host 172.16.86.111 and tcp port 443