如题,我看MSDN讲Navigate2有个参数:lpszHeaders可以指定要发送到服务器的可选的头信息。
不知道能不能用这个参数来指定Referer,比如我想指定Referer地址为http://www.budin.cn,那么这个参数应该怎么写,格式是什么?我没找到相关的资料,谢谢大家了
不知道能不能用这个参数来指定Referer,比如我想指定Referer地址为http://www.budin.cn,那么这个参数应该怎么写,格式是什么?我没找到相关的资料,谢谢大家了
解决方案 »
- 怎么让combobox的最上面那个有编辑框的显示不同?
- 用ADO访问数据库,20万死机!!!!
- 大家帮忙,关于向导页“取消”按钮的问题,急!!!~~~~
- VC用ADO调用SQL SERVER 2000 存储过程的问题,在线等待,感谢回答
- 给我回复的朋友,可以收分了,分不多,请笑纳
- CRichEditCtrl中选中文本时的选中色能不能设置成其它色。
- 没有调用::ReleaseMutex()为什么::WaitForSingleObject(hMutex, INFINITE)?还能返回
- 问大家一个最菜问题 看了别笑
- for dz_w(快乐之星)2
- VC6中 CEditView 的一点问题.
- 流式套接字中,如果我指定接收100字节,此时有数据送达,但不足100字节,recv也会返回,有没有选项设置一定要读满100字节才返回?
- 如何在对话框中嵌入网页?
GET http://www.sina.com.cn HTTP/1.0
Host: www.sina.com.cn
prama: no-cache
Referer: http://www.budin.cn
Accept: text/html, image/png, image/jpeg, image/gif, image/x-xbitmap, */*
CString Get; Get="GET http://www.sina.com.cn HTTP/1.0 ";
Get= Get+ "Host: www.sina.com.cn ";
Get= Get+ "prama: no-cache ";
Get= Get+ "Referer: http://www.budin.cn ";
Get= Get+ "Accept: text/html, image/png, image/jpeg, image/gif, image/x-xbitmap, */*";
Navigate2(_T(site),NULL,NULL,"Referer: http://www.sina.com.cn",NULL,NULL);
--------------------------
打不开网页,该页无法显示
Host: www.sina.com.cn
prama: no-cache
把这几行去掉(程序自动添加的,不需要手动设定),现在能打开网页了,可是Referer: http://www.budin.cn还是没起作用。 抓包看了。和在软件里点击链接只有3处不同:
1. Get的地址,包里显示的虽然不同但都是首页,访问的页面是一样的
2. Accept-Encoding: gzip, deflate..Accept-Language: zh-cn..这两个的位置一前一后刚好反过来
3. cookies的未尾,点击链接多了一段“ASPSESSIONIDASDSCDQA=JNMJJLDCFJEPNOBHDFMFAKNE”------------------------------------------------------------------
//点击链接的包
GET /default.html HTTP/1.1..Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/msword, */*..Referer: http://www.budin.cn/..Accept-Language: zh-cn..Accept-Encoding: gzip, deflate..If-Modified-Since: Mon, 24 Jul 2006 15:23:03 GMT..If-None-Match: "881435e35afc61:378"..User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Alexa Toolbar)..Host: www.budin.cn..Connection: Keep-Alive..Cookie: rtime=1; ltime=1152349149875; cnzz_eid=67068422-; Budin=password=82e2a137e1066616&userid=6&usercookies=0&userclass=5&username=%BC%D7%BF%C6%B6%FB%CB%EC&editor=html; rtime=2; ltime=1153812021500; cnzz_eid=67068422-; TZ=0; cnzz02=54; Cookie_itsun=y; is_use_cookie=yes; is_get_108173=yes; ASPSESSIONIDASDSCDQA=JNMJJLDCFJEPNOBHDFMFAKNE....
//直接输入网址由软件伪造Referer的包GET / HTTP/1.1..Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/msword, */*..Referer: http://www.budin.cn/..Accept-Encoding: gzip, deflate..Accept-Language: zh-cn..If-Modified-Since: Mon, 24 Jul 2006 15:23:03 GMT..If-None-Match: "881435e35afc61:378"..User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Alexa Toolbar)..Host: www.budin.cn..Connection: Keep-Alive..Cookie: rtime=1; ltime=1152349149875; cnzz_eid=67068422-; Budin=password=82e2a137e1066616&userid=6&usercookies=0&userclass=5&username=%BC%D7%BF%C6%B6%FB%CB%EC&editor=html; rtime=2; ltime=1153812142515; cnzz_eid=67068422-; TZ=0; cnzz02=55; Cookie_itsun=y; is_use_cookie=yes; is_get_108173=yes....
/////点击链接的包GET / HTTP/1.1..Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/msword, */*..Referer: http://www.budin.cn/..Accept-Language: zh-cn..Accept-Encoding: gzip, deflate..If-Modified-Since: Tue, 25 Jul 2006 11:58:12 GMT..If-None-Match: "a48f59ae1afc61:378"..User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Alexa Toolbar)..Host: www.budin.cn..Connection: Keep-Alive..Cookie: rtime=1; ltime=1152349149875; cnzz_eid=67068422-; Budin=password=82e2a137e1066616&userid=6&usercookies=0&userclass=5&username=%BC%D7%BF%C6%B6%FB%CB%EC&editor=html; rtime=2; ltime=1153832797109; cnzz_eid=67068422-; TZ=0; cnzz02=102; Cookie_itsun=y; is_use_cookie=yes; is_get_108173=yes....
_____________________________________________我用了 CInternetSession* mySession;
CHttpFile* myHttpFile=NULL;
CHttpConnection* lphttpConnection; 建立Http链接并用OpenURL打开该URL,最后用Navigate浏览网页。 达到以上效果。可是伪造的Referer还是没起效果。 郁闷中....