Fiddler:响应要求客户证书的请求 [英] Fiddler: Respond to Requests Requiring a Client Certificate

查看:515
本文介绍了Fiddler:响应要求客户证书的请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试抓取一个首先要求提供证书的网站。通过身份验证后,它将要求您提供用户名和密码。无论如何,我正在尝试使用提琴手来查看需要复制的内容,然后将其打开为捕获流量,然后转到Internet Explorer并尝试访问该站点,它显示 Internet Explorer无法显示该网页,然后当我关闭提琴手并再次尝试时,它将带我进入登录页面。

I'm trying to scrape a website that first asks for a certificate. After you are authenticated it then will ask you to provide a username and password. Anyway I'm trying to use fiddler to see what i need to replicate and when i turn on it to "Capture traffic" and then I go to internet explorer and try to access the site it says " Internet Explorer cannot display the webpage " then when i turn off fiddler and try it again it brings me to the login page.

我尝试了此链接,我尝试了所有操作(将其转换为.cer文件并拖动到文件夹中也尝试了将代码复制并粘贴到规则文件中,接受证书),但两种方法均无效。还有人有其他想法吗?

I've tried this link and i tried everything (Turning it into a .cer file and dragging into the folder also tried copy and pasting the code into the rule file to accept the certificate) and neither way worked. Does anyone have any other ideas.

我想以某种方式替换提琴手根证书吗?还是有人可以建议的解决方案?

Am I suppose to replace the fiddler root certificate somehow? or is there any solution that someone can suggest?

推荐答案

我发现了这个问题。以防万一这绊倒了别人。代码的oSession位必须是OnBeforeRequest行之后的第一行。我不记得它曾经在哪里,但没有用。示例:

I figured out this problem. Just incase this trips someone else up. The oSession bit of code needed to be the first line after the OnBeforeRequest line. I don't remember where it was before but it didn't work. Example:

 static function  OnBeforeRequest(oSession: Session) {
   oSession["https-Client-Certificate"]= "C:\\Yourcerfilelocation.cer"; 
 //I omitted the standard code

}

编辑:OnBeforeRequest是一种更好的放置方法,而不是OnPeekAtRequestHeaders。

Edit: OnBeforeRequest is a better method to place it instead of OnPeekAtRequestHeaders.

这篇关于Fiddler:响应要求客户证书的请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆