C# 如何使用FiddleCore捕获SSL GET请求
我正在尝试获取每个请求的完整HTTPS url。 到目前为止,我只收到一个带有域url的连接请求 如何获取完整的URL请求 这是到目前为止我的代码C# 如何使用FiddleCore捕获SSL GET请求,c#,proxy-server,fiddlercore,C#,Proxy Server,Fiddlercore,我正在尝试获取每个请求的完整HTTPS url。 到目前为止,我只收到一个带有域url的连接请求 如何获取完整的URL请求 这是到目前为止我的代码 Fiddler.FiddlerApplication.BeforeRequest += FiddlerApplication_BeforeRequest; Fiddler.FiddlerApplication.BeforeResponse += FiddlerApplication_BeforeResponse; if (!Fiddler.Cer
Fiddler.FiddlerApplication.BeforeRequest += FiddlerApplication_BeforeRequest;
Fiddler.FiddlerApplication.BeforeResponse += FiddlerApplication_BeforeResponse;
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.");
}
}
Fiddler.FiddlerApplication.Startup(0,
FiddlerCoreStartupFlags.Default |
FiddlerCoreStartupFlags.AllowRemoteClients |
FiddlerCoreStartupFlags.DecryptSSL |
FiddlerCoreStartupFlags.MonitorAllConnections |
FiddlerCoreStartupFlags.RegisterAsSystemProxy |
FiddlerCoreStartupFlags.ChainToUpstreamGateway |
FiddlerCoreStartupFlags.CaptureLocalhostTraffic);
void FiddlerApplication_BeforeResponse(Session oSession)
{
if (oSession.uriContains("youtube"))
{
Console.WriteLine(Osession.fullUrl());
}
}
void FiddlerApplication_BeforeRequest(Session oSession)
{
if (oSession.uriContains("youtube"))
{
Console.WriteLine(Osession.fullUrl());
oSession.bBufferResponse = true;
}
}
在浏览器的帮助下,我尝试访问URL。小提琴手能抓住它吗
非常感谢。
Ran当然,Fiddler可以捕捉到这一点。如果您只看到连接,则表明客户端不信任Fiddler的证书。您应该放回记录通知和错误的行;我猜你会看到一个注意到
makecert.exe
不属于它的地方
您上面的代码将无法编译,因为
OSession
与OSession
是,是,是不同。这是最好的办法。你太棒了。非常感谢你!!我认为放置dll的CertMaker、BCMakeCert就足够了。如果你想使用CertMaker.dll/BCMakeCert.dll,你需要将它们放在正确的位置,并且有与FiddlerCore的.NET版本匹配的正确版本。