我开发了一个基于fiddlerCore的wpf应用程序,它可以帮助我捕获https resources.then --我发现了一个问题,还警告了一个通知安装证书(DO_NOT_TRUST_FiddlerRoot).i想隐藏这个窗口的窗口。在这里输入图像描述
安装证书方法如下:
public static bool InstallCertificate()
{
if (!CertMaker.rootCertExists())
{
if (!CertMaker.createRootCert())
return false;
if (!CertMaker.trustRootCert())
return false;
Cert = FiddlerApplication.Prefs.GetStringPref("fiddler.certmaker.bc.cert", null);
Key = FiddlerApplication.Prefs.GetStringPref("fiddler.certmaker.bc.key", null);
}
return true;
}
发布于 2017-03-20 06:49:50
幸运的是,我找到了解决这个问题的办法。将下面的代码添加到myfiddler.cs中的公共无效的myfiddler.cs()中:
CONFIG.bCaptureCONNECT = true;
CONFIG.IgnoreServerCertErrors = false;
if (!CertMaker.rootCertExists())
{
if (!CertMaker.createRootCert())
{
throw new Exception("Unable to create cert for FiddlerCore.");
}
X509Store certStore = new X509Store(StoreName.Root, StoreLocation.LocalMachine);
certStore.Open(OpenFlags.ReadWrite);
try
{
certStore.Add(CertMaker.GetRootCertificate());
}
finally
{
certStore.Close();
}
}
只需安装认证并存储。
这样,你就找不到"DO_NOT_TRUST_FiddlerRoot“窗口了!
https://stackoverflow.com/questions/42776876
复制相似问题