饼干来自哪里?

时间:2012-08-14 16:18:21

标签: cookies httpwebrequest

之前我从未访问过一个网站,这是我第一次访问该网站尝试登录时,我使用fiddler来监控帖子数据,

在http帖子标题中,那里已经有了cookie。怎么会发生?

如何生成cookie以自动登录网站?

以下是原始标题。

POST https://us.battle.net/login/en/?ref=&app= HTTP/1.1
Host: us.battle.net
Connection: keep-alive
Content-Length: 64
Cache-Control: max-age=0
Origin: https://us.battle.net
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko)        Chrome/21.0.1180.77 Safari/537.1
Content-Type: application/x-www-form-urlencoded
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Referer: https://us.battle.net/login/en/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8,en-GB;q=0.6
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: perm=1; __utma=134253166.2032096419.1344959743.1344959743.1344959743.1; __utmb=134253166.2.10.1344959743; __utmc=134253166; __utmz=134253166.1344959743.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided)

accountName=aaaa%40me.com&password=password&persistLogin=on

1 个答案:

答案 0 :(得分:0)

当您访问登录页面时,可能已在GET请求中生成了Cookie。

或者,虽然您没有直接访问过某个网站,但它可能已经集成到您访问过的另一个网站中,例如在iframe中。例如,这在广告网络中很常见。