1. wireshark过滤
1.1 过滤源ip、目的ip
ip.dst==192.168.101.8,查找目的地址为192.168.101.8
ip.src==1.1.1.1,查找源地址为1.1.1.1
1.2 端口过滤
tcp.port==80,把源端口和目的端口为80的都过滤出来
tcp.dstport==80,只过滤目的端口为80的,
tcp.srcport==80,只过滤源端口为80的包;
1.3 协议过滤
直接在Filter框中直接输入协议名即可,使用and连接多个筛选条件
http and http2 and tcp
1.4 http模式过滤
过滤get包,http.request.method=="GET";
过滤post包,http.request.method=="POST";
2. nginx启动问题
- 启动默认占用的是8080端口(如果有vscode启动的项目,先全部关闭)
- 查看端口占用情况:netstat -aon|findstr "8080"
- 错误日志所在目录:/www/logs/error.log
3. telnet的使用方法
- 在运行那儿输入telnet
- 输入 open www.chrono.com 80 回车
- 输入 ctrl + ] 回车
- 输入请求后按两次回车(如果没有出来,可以点击右键)
GET /09-1 HTTP/1.1
Host: www.chrono.com
4. wireshark无法抓到http2
- 以《透视http协议》提供的资料 http_study/wireshark/31-1.pcgpng 为例,将http_study/wireshark/31-1.log放到其他的地方,例如:D:/ssl/sslkeylog.log
- 设置环境变量:SSLKEYLOGFILE,value:D:\ssl\sslkeylog.log
- 配置wireshark,wireshark -> 编辑 -> 首选项 -> Protocols -> TLS,选择刚才的地址