(一)抓Https包
2021-01-28 08:12
标签:技术 proc 保存 logs 效果 点击 process col sts 文章链接:https://blog.csdn.net/amrenyu/article/details/80745674 1,点击上访的Tools-->Options 2,分别按照下面两张图设置 HTTPS、connections两个页面。 3,点击“OK”以后Fiddler会弹出一个对话框问你是否要让Windows信任Fiddler生成的自签证书,选择“yes”以后,还会弹出一些对话框,直接“yes”或“OK”即可。 在如上设置成功过后!!仍然发现有些https请求显示Tunnel to 443
搜索代码OnBeforeRequest 在这个方法的最后一个大括号后面,插入以下代码: 保存,多重启几次fiddler 搜索代码:OnBeforeRequest 添加代码,最好放最前面: 效果: (一)抓Https包 标签:技术 proc 保存 logs 效果 点击 process col sts 原文地址:https://www.cnblogs.com/lvchengda/p/13214560.html勾选
添加代码
var hosts = ‘zkd.me develop.dog‘;
FiddlerApplication.Log.LogFormat("Logger session {0}, Url: {1}, isHttps: {2}, port: {3}", oSession.id, oSession.fullUrl, oSession.isHTTPS, oSession.port);
if(hosts.indexOf(oSession.host) > -1){
FiddlerApplication.Log.LogFormat("Capture session {0}, Url: {1}, isHttps: {2}, port: {3}", oSession.id, oSession.fullUrl, oSession.isHTTPS, oSession.port);
if(oSession.HTTPMethodIs(‘CONNECT‘)){
FiddlerApplication.Log.LogString(‘create fake tunnel response‘);
oSession[‘x-replywithtunnel‘] = ‘FakeTunnel‘;
return;
}
if (oSession.isHTTPS){
FiddlerApplication.Log.LogString(‘switch https to http request‘);
oSession.fullUrl = oSession.fullUrl.Replace("https://","http://");
oSession.port = 80;
}
FiddlerApplication.Log.LogFormat("Processed session {0}, Url: {1}, isHttps: {2}, port: {3}", oSession.id, oSession.fullUrl, oSession.isHTTPS, oSession.port);
}
FiddlerApplication.Log.LogFormat("Logger session {0}, Url: {1}, isHttps: {2}, port: {3}", oSession.id, oSession.fullUrl, oSession.isHTTPS, oSession.port);
}
让HTTP请求和HTTPS请求显示不一样的颜色
if(oSession.isHTTPS && oSession.url.indexOf(oSession.host)> -1){
oSession["ui-color"] = "blue";
}
if(!oSession.isHTTPS && oSession.url.indexOf(oSession.host)> -1){
oSession["ui-color"] = "green";
}
上一篇:“数组去重”问题