简体   繁体   English

如何使用WebBrowser获取HttpOnly的Cookie?

[英]How to use WebBrowser to obtain HttpOnly's Cookie?

I want to get through the WebBrowser login cookie and ultimately send the cookie to the HttpWebRequest . 我想通过WebBrowser登录cookie,并最终将cookie发送到HttpWebRequest They webBrowser1.Document.Cookie get less than the HttpOnly that cookie. 他们的webBrowser1.Document.CookieHttpOnly cookie少。 Way WebBrowser HttpOnly a cookie? 方式WebBrowser HttpOnly是cookie?

Development language is C# 开发语言是C#

If you are asking how to get access to an HttpOnly cookie on the browser, I don't think you can as its more of a mechanism for the server, and the WHOLE POINT of HttpOnly is that it stops the client tampering with cookies. 如果您问如何在浏览器上访问HttpOnly cookie,我认为您不能将其更多地用作服务器的一种机制,而HttpOnly的整个要点是它可以阻止客户端篡改cookie。

So you can set them in your request but I dont think you can access them via the browser unless you can maybe get access to the underlying response which may contain it. 因此,您可以在请求中设置它们,但我认为您无法通过浏览器访问它们,除非您可以访问可能包含它的基础响应。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM