Fiddler: Respond to Requests Requiring a Client Certificate

南笙酒味 提交于 2019-12-10 20:22:53

问题


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.

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?


回答1:


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

}

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



来源:https://stackoverflow.com/questions/17451892/fiddler-respond-to-requests-requiring-a-client-certificate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!