问题描述
我正在关注此博客文章来尝试看看Fiddlercore做什么.根据博客,最终的控制台输出应类似于:
I'm following this blogpost to try and see what Fiddlercore does.The resulting console output, as per the blog, should be something like:
Requested resource from URL http://www.mozilla.org/
Requested resource from URL http://mozorg.cdn.mozilla.net/media/css/tabzilla-min.css?build=c2a3f7a
Requested resource from URL http://mozorg.cdn.mozilla.net/media/js/site-min.js?build=c2a3f7a
Requested resource from URL http://mozorg.cdn.mozilla.net/media/css/responsive-min.css?build=c2a3f7a
Requested resource from URL http://mozorg.cdn.mozilla.net/media/img/favicon.ico
Requested resource from URL http://www.mozilla.org/en-US/
但是,就我而言,输出具有一些相当通用的URL.我想我的代理,浏览器……某处的设置有些问题?但是我不知道该怎么办.我正在尝试编写等待特定资源加载的代码,因此下面的输出并不是真正有用.
However, in my case, the output has some rather generic URLs. I suppose there's something awry with my proxy, browser, ... settings somewhere? But I have no idea what.I'm trying to write code that waits for a specific resource to load, so the output below is not really useful.
Starting Fiddler proxy
Fiddler proxy listening on port 6143
Requested resource from URL http://ocsp.digicert.com/
Requested resource from URL http://ocsp.digicert.com/
Requested resource from URL http://ocsp.digicert.com/
Requested resource from URL http://www.mozilla.org/
Requested resource from URL http://ocsp.digicert.com/
Requested resource from URL http://vassg142.ocsp.omniroot.com/
Requested resource from URL http://ocsp.digicert.com/
Requested resource from URL http://clients1.google.com/ocsp
Requested resource from URL http://ocsp.digicert.com/
Requested resource from URL http://clients1.google.com/ocsp
Requested resource from URL http://clients1.google.com/ocsp
Requested resource from URL http://clients1.google.com/ocsp
推荐答案
问题已解决.首先,我没有安装证书,但已使用以下代码修复了该问题:
Problem fixed.First of all, I didn't have the certificate installed but was fixed with this code:
if (!Fiddler.CertMaker.rootCertExists())
{
if (!Fiddler.CertMaker.createRootCert())
{
throw new Exception("Unable to create cert for FiddlerCore.");
}
}
if (!Fiddler.CertMaker.rootCertIsTrusted())
{
if (!Fiddler.CertMaker.trustRootCert())
{
throw new Exception("Unable to install FiddlerCore's cert.");
}
}
第二,我必须为Selenium定义SslProxy来捕获HTTPS:
Secondly, I had to define the SslProxy for Selenium to capture HTTPS:
OpenQA.Selenium.Proxy proxy = new OpenQA.Selenium.Proxy();
proxy.HttpProxy = string.Format("127.0.0.1:{0}", proxyPort);
proxy.SslProxy = string.Format("127.0.0.1:{0}", proxyPort);
这篇关于Fiddlercore-请求的资源URL是通用的(与OSCP相关),而不是实际的资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!