赞
踩
参考Fiddler在抓取https数据包时如何解决Tunnel to 443的问题?_fiddler显示443-CSDN博客
内容基本和参考链接一致,修改了一处关键错误,在下面的红色字体部分,本文仅作保存方便自用时查找,点赞请给原文章。
- 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);
- }
然后保存重启fiddler即可。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。