本文章被今日头条推荐

1、在WebBrowser中实现抓取301和302协议

在WebBrowser中抓取301和302协议目前官方提供的组件远远不够,需要借助HttpMonitor.dll。这个组件由美国人开发,目前项目宿主在

http://www.codeproject.com/Articles/157329/Http-Monitor-for-Webbrowser-Control 上,这个项目在vs2010上报错,经过我的调整,目前可以正常编译。组件下载

编译过程中可以联系我。qq 840189859

用之前要求注册组件。注册过程需要严格按照下面的步骤

将HttpMonitor.dll拷贝到C:\Windows\SysWOW64

用管理员身份运行命令行,按照步骤输入以下命令

命令1:

C:

命令2

 cd C:\Windows\SysWOW64

命令3  

regsvr32 HttpMonitor.dll

如果显示注册成功就成功,否则会显示错误,注册失败。

在注册过程中,会遭到360安全卫士,杀毒软件等的阻拦,建议关闭。

2、在WebBrowser实现链接的篡改。

我们在WebBrowser有时候需要篡改链接,比如说我们需要在每个链接上都加上?id=12113221312312。没有接触过这类似的需求,网上这类的需求和实现方式都少。

我们来实现下

WebBrowser有Navigating事件

private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)

我们在Navicating事件上加如下代码

private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e){
string url = e.Url.ToString();
if (url.ToLower().Contains("id="))
{
//可以随意跳转
e.Cancel = false;
}
else
{
e.Cancel = true;
string newUrtl = String.Format("{0}?{1}", url,"id=12113221312312");
webBrowser1.Navigate(newUrtl);
}
}

代码解释

如果连接中没有id=停止跳转。加上id=12113221312312进行跳转。

代码下载

另外请打击查看软件截图

抓取到的数据举例:

http://192.168.0.2:8080/sso/js/common_rosters.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"6612-1477622585251"
Content-Type: application/javascript
Content-Length: 6612
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\1GGZZZMD\common_rosters[1].js
--------------
http://192.168.0.2:8080/sso/js/passwordstrength.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"3506-1477622585263"
Content-Type: application/javascript
Content-Length: 3506
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\1GGZZZMD\passwordstrength[1].js
--------------
http://192.168.0.2:8080/sso/css/jquery-ui-themes.css
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"28572-1477622584980"
Content-Type: text/css
Content-Length: 28572
Last-Modified: Fri, 28 Oct 2016 02:43:04 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\1GGZZZMD\jquery-ui-themes[1].css
--------------
http://192.168.0.2:8080/sso/css/axure_rp_page.css
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"3225-1477622584973"
Content-Type: text/css
Content-Length: 3225
Last-Modified: Fri, 28 Oct 2016 02:43:04 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\1GGZZZMD\axure_rp_page[1].css
--------------
http://192.168.0.2:8080/sso/css/styles.css
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"5413-1477622584984"
Content-Type: text/css
Content-Length: 5413
Last-Modified: Fri, 28 Oct 2016 02:43:04 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\1GGZZZMD\styles[1].css
--------------
http://192.168.0.2:8080/sso/css/styles1.css
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"3815-1477622584986"
Content-Type: text/css
Content-Length: 3815
Last-Modified: Fri, 28 Oct 2016 02:43:04 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\1GGZZZMD\styles1[1].css
--------------
http://192.168.0.2:8080/sso/js/jquery-1.7.1.min.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"93868-1477622585257"
Content-Type: application/javascript
Content-Length: 93868
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\1GGZZZMD\jquery-1.7.1.min[1].js
--------------
http://192.168.0.2:8080/sso/js/jquery-ui-1.8.10.custom.min.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"72277-1477622585260"
Content-Type: application/javascript
Content-Length: 72277
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\1GGZZZMD\jquery-ui-1.8.10.custom.min[1].js
--------------
http://192.168.0.2:8080/sso/js/axure/axQuery.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"12768-1477622585089"
Content-Type: application/javascript
Content-Length: 12768
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\1GGZZZMD\axQuery[1].js
--------------
http://192.168.0.2:8080/sso/login2?service=http://192.168.0.2:8080/EverbrightXL_trust_web_portals
FROM - http://192.168.0.2:8080/sso/js/axutils.js
REQUEST HEADERS -
GET /sso/js/axutils.js HTTP/1.1
Accept: */*
Referer: http://192.168.0.2:8080/sso/login2?message={'interfaceVersion':'1.0.0','systemCode':'20101','extend':'20101','userLoginName':'su','userPassWord':'123456','reqIP':'192.168.1.1','reqCharSet':'UTF-8','reqTime':'<%=date2%>','chnlCode':'BS','signType':'MD5','signMsg':'test'}
Accept-Language: en-US,en;q=0.8,zh-Hans-CN;q=0.5,zh-Hans;q=0.3
UA-CPU: AMD64
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; Win64; x64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729)
Host: 192.168.0.2:8080
Connection: Keep-Alive
Cookie: JSESSIONID=93C8B0FEB138574BC599B3752085F6F8 RESPONSE HEADERS - --------------
http://192.168.0.2:8080/sso/js/axure/annotation.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"6520-1477622585086"
Content-Type: application/javascript
Content-Length: 6520
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\1GGZZZMD\annotation[1].js
--------------
http://192.168.0.2:8080/sso/js/axure/axQuery.std.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"30730-1477622585093"
Content-Type: application/javascript
Content-Length: 30730
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\U8BWLIJO\axQuery.std[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/messagecenter.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"7172-1477622585246"
Content-Type: application/javascript
Content-Length: 7172
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\U8BWLIJO\messagecenter[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/doc.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"26952-1477622585175"
Content-Type: application/javascript
Content-Length: 26952
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\U8BWLIJO\doc[1].js
--------------
http://192.168.0.2:8080/sso/js/data/document.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"46413-1477622585155"
Content-Type: application/javascript
Content-Length: 46413
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\U8BWLIJO\document[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/events.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"58560-1477622585181"
Content-Type: application/javascript
Content-Length: 58560
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\U8BWLIJO\events[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/action.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"37114-1477622585161"
Content-Type: application/javascript
Content-Length: 37114
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\U8BWLIJO\action[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/expr.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"17330-1477622585184"
Content-Type: application/javascript
Content-Length: 17330
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\9FTP5DFT\expr[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/geometry.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"11409-1477622585189"
Content-Type: application/javascript
Content-Length: 11409
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\9FTP5DFT\geometry[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/flyout.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"9519-1477622585187"
Content-Type: application/javascript
Content-Length: 9519
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\9FTP5DFT\flyout[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/ie.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"11979-1477622585195"
Content-Type: application/javascript
Content-Length: 11979
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\9FTP5DFT\ie[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/model.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"1747-1477622585202"
Content-Type: application/javascript
Content-Length: 1747
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\9FTP5DFT\model[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/repeater.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"63546-1477622585209"
Content-Type: application/javascript
Content-Length: 63546
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\9FTP5DFT\repeater[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/sto.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"7707-1477622585211"
Content-Type: application/javascript
Content-Length: 7707
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\OWXEU893\sto[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/utils.temp.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"4051-1477622585220"
Content-Type: application/javascript
Content-Length: 4051
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\OWXEU893\utils.temp[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/variables.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"6672-1477622585223"
Content-Type: application/javascript
Content-Length: 6672
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\OWXEU893\variables[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/drag.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"11272-1477622585178"
Content-Type: application/javascript
Content-Length: 11272
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\OWXEU893\drag[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/move.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"2645-1477622585205"
Content-Type: application/javascript
Content-Length: 2645
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\OWXEU893\move[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/visibility.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"17466-1477622585228"
Content-Type: application/javascript
Content-Length: 17466
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\OWXEU893\visibility[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/style.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"40226-1477622585214"
Content-Type: application/javascript
Content-Length: 40226
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\OWXEU893\style[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/adaptive.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"15479-1477622585164"
Content-Type: application/javascript
Content-Length: 15479
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\OWXEU893\adaptive[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/tree.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"7389-1477622585217"
Content-Type: application/javascript
Content-Length: 7389
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\OWXEU893\tree[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/init.temp.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"6631-1477622585197"
Content-Type: application/javascript
Content-Length: 6631
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\OWXEU893\init.temp[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/legacy.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"5676-1477622585200"
Content-Type: application/javascript
Content-Length: 5676
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\OWXEU893\legacy[1].js
--------------
http://192.168.0.2:8080/sso/js/scripts/axure/viewer.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"2627-1477622585225"
Content-Type: application/javascript
Content-Length: 2627
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\OWXEU893\viewer[1].js
--------------
http://192.168.0.2:8080/sso/login2?message={'interfaceVersion':'1.0.0','systemCode':'20101','extend':'20101','userLoginName':'su','userPassWord':'123456','reqIP':'192.168.1.1','reqCharSet':'UTF-8','reqTime':'<%=date2%>','chnlCode':'BS','signType':'MD5','signMsg':'test'}
REQUEST HEADERS -
GET /sso/login2?message={'interfaceVersion':'1.0.0','systemCode':'20101','extend':'20101','userLoginName':'su','userPassWord':'123456','reqIP':'192.168.1.1','reqCharSet':'UTF-8','reqTime':'<%=date2%>','chnlCode':'BS','signType':'MD5','signMsg':'test'} HTTP/1.1
Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, */*
Accept-Language: en-US,en;q=0.8,zh-Hans-CN;q=0.5,zh-Hans;q=0.3
UA-CPU: AMD64
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; Win64; x64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729)
Host: 192.168.0.2:8080
Connection: Keep-Alive RESPONSE HEADERS -
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Cache-Control: no-store
Set-Cookie: JSESSIONID=93C8B0FEB138574BC599B3752085F6F8; Path=/sso
Content-Type: text/html;charset=UTF-8
Content-Language: en-US
Transfer-Encoding: chunked
Date: Mon, 31 Oct 2016 08:58:43 GMT JSESSIONID=93C8B0FEB138574BC599B3752085F6F8; Path=/sso CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\9FTP5DFT\login2[1].htm
--------------
http://192.168.0.2:8080/sso/js/axure/globals.js
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"156-1477622585114"
Content-Type: application/javascript
Content-Length: 156
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\1GGZZZMD\globals[1].js
--------------
http://192.168.0.2:8080/sso/js/axutils.js
TO - http://192.168.0.2:8080/sso/login2?service=http://192.168.0.2:8080/EverbrightXL_trust_web_portals
REQUEST HEADERS -
GET /sso/js/axutils.js HTTP/1.1
Accept: */*
Referer: http://192.168.0.2:8080/sso/login2?message={'interfaceVersion':'1.0.0','systemCode':'20101','extend':'20101','userLoginName':'su','userPassWord':'123456','reqIP':'192.168.1.1','reqCharSet':'UTF-8','reqTime':'<%=date2%>','chnlCode':'BS','signType':'MD5','signMsg':'test'}
Accept-Language: en-US,en;q=0.8,zh-Hans-CN;q=0.5,zh-Hans;q=0.3
UA-CPU: AMD64
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; Win64; x64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729)
Host: 192.168.0.2:8080
Connection: Keep-Alive
Cookie: JSESSIONID=93C8B0FEB138574BC599B3752085F6F8
JSESSIONID=93C8B0FEB138574BC599B3752085F6F8 RESPONSE HEADERS -
HTTP/1.1 302 Found
Server: Apache-Coyote/1.1
Location: http://192.168.0.2:8080/sso/login2?service=http://192.168.0.2:8080/EverbrightXL_trust_web_portals
Content-Type: text/html
Transfer-Encoding: chunked
Date: Mon, 31 Oct 2016 08:58:43 GMT --------------
http://192.168.0.2:8080/sso/js/axutils.js
REQUEST HEADERS -
GET /sso/login2?service=http://192.168.0.2:8080/EverbrightXL_trust_web_portals HTTP/1.1
Accept: */*
Referer: http://192.168.0.2:8080/sso/login2?message={'interfaceVersion':'1.0.0','systemCode':'20101','extend':'20101','userLoginName':'su','userPassWord':'123456','reqIP':'192.168.1.1','reqCharSet':'UTF-8','reqTime':'<%=date2%>','chnlCode':'BS','signType':'MD5','signMsg':'test'}
Accept-Language: en-US,en;q=0.8,zh-Hans-CN;q=0.5,zh-Hans;q=0.3
UA-CPU: AMD64
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; Win64; x64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729)
Host: 192.168.0.2:8080
Connection: Keep-Alive
Cookie: JSESSIONID=93C8B0FEB138574BC599B3752085F6F8
JSESSIONID=93C8B0FEB138574BC599B3752085F6F8 RESPONSE HEADERS -
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Cache-Control: no-store
Content-Type: text/html;charset=UTF-8
Content-Language: en-US
Transfer-Encoding: chunked
Date: Mon, 31 Oct 2016 08:58:43 GMT --------------
http://192.168.0.2:8080/sso/images/login/u4.png
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"2504-1477622585036"
Content-Type: image/png
Content-Length: 2504
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\OWXEU893\u4[1].png
--------------
http://192.168.0.2:8080/sso/images/login/u011.png
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"2984-1477622585003"
Content-Type: image/png
Content-Length: 2984
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\OWXEU893\u011[1].png
--------------
http://192.168.0.2:8080/sso/images/login/u0.png
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"193183-1477622585000"
Content-Type: image/png
Content-Length: 193183
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\OWXEU893\u0[1].png
--------------
http://192.168.0.2:8080/sso/images/login/u09.png
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"2966-1477622585022"
Content-Type: image/png
Content-Length: 2966
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\OWXEU893\u09[1].png
--------------
http://192.168.0.2:8080/sso/images/login/u013.jpg
REQUEST HEADERS - RESPONSE HEADERS -
HTTP/1.1 200 OK
ETag: W/"3213-1477622585007"
Content-Type: image/jpeg
Content-Length: 3213
Last-Modified: Fri, 28 Oct 2016 02:43:05 GMT CACHE PATH - C:\Users\malia_000\AppData\Local\Microsoft\Windows\INetCache\IE\9FTP5DFT\u013[1].jpg
--------------
http://192.168.0.2:8080/sso/login2;jsessionid=93C8B0FEB138574BC599B3752085F6F8?message={'interfaceVersion':'1.0.0','systemCode':'20101','extend':'20101','userLoginName':'su','userPassWord':'123456','reqIP':'192.168.1.1','reqCharSet':'UTF-8','reqTime':'<%=date2%>','chnlCode':'BS','signType':'MD5','signMsg':'test'}
TO - http://192.168.0.2:8080/ss1
REQUEST HEADERS -
POST /sso/login2;jsessionid=93C8B0FEB138574BC599B3752085F6F8?message={'interfaceVersion':'1.0.0','systemCode':'20101','extend':'20101','userLoginName':'su','userPassWord':'123456','reqIP':'192.168.1.1','reqCharSet':'UTF-8','reqTime':'<%=date2%>','chnlCode':'BS','signType':'MD5','signMsg':'test'} HTTP/1.1
Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, */*
Referer: http://192.168.0.2:8080/sso/login2?message={'interfaceVersion':'1.0.0','systemCode':'20101','extend':'20101','userLoginName':'su','userPassWord':'123456','reqIP':'192.168.1.1','reqCharSet':'UTF-8','reqTime':'<%=date2%>','chnlCode':'BS','signType':'MD5','signMsg':'test'}
Accept-Language: en-US,en;q=0.8,zh-Hans-CN;q=0.5,zh-Hans;q=0.3
Content-Type: application/x-www-form-urlencoded
UA-CPU: AMD64
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; Win64; x64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729)
Host: 192.168.0.2:8080
Content-Length: 152
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: JSESSIONID=93C8B0FEB138574BC599B3752085F6F8
JSESSIONID=93C8B0FEB138574BC599B3752085F6F8 RESPONSE HEADERS -
HTTP/1.1 302 Found
Server: Apache-Coyote/1.1
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Cache-Control: no-store
Set-Cookie: CASPRIVACY=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/sso
Set-Cookie: TGC="vMkEY2tO/Pjru4BAlmW3qNKDtJEZaliCxxih7Du9t43aemLflQqbnCv3V7dIelyt5AHawnGPHaU4n/mqCrJbBm6c6GBMLQuDH1/5YRdEgqqskgmfCpSTe+KTs6j90JMG0302jNe9uXUjZMxGA2/glQ=="; Version=1; Path=/sso
Location: http://192.168.0.2:8080/ss1
Content-Type: text/html;charset=UTF-8
Content-Language: en-US
Content-Length: 0
Date: Mon, 31 Oct 2016 08:58:46 GMT CASPRIVACY=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/sso --------------
http://192.168.0.2:8080/ss1
FROM - http://192.168.0.2:8080/sso/login2;jsessionid=93C8B0FEB138574BC599B3752085F6F8?message={'interfaceVersion':'1.0.0','systemCode':'20101','extend':'20101','userLoginName':'su','userPassWord':'123456','reqIP':'192.168.1.1','reqCharSet':'UTF-8','reqTime':'<%=date2%>','chnlCode':'BS','signType':'MD5','signMsg':'test'}
REQUEST HEADERS -
GET /ss1 HTTP/1.1
Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, */*
Referer: http://192.168.0.2:8080/sso/login2?message={'interfaceVersion':'1.0.0','systemCode':'20101','extend':'20101','userLoginName':'su','userPassWord':'123456','reqIP':'192.168.1.1','reqCharSet':'UTF-8','reqTime':'<%=date2%>','chnlCode':'BS','signType':'MD5','signMsg':'test'}
Accept-Language: en-US,en;q=0.8,zh-Hans-CN;q=0.5,zh-Hans;q=0.3
UA-CPU: AMD64
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; Win64; x64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729)
Host: 192.168.0.2:8080
Connection: Keep-Alive
Cache-Control: no-cache RESPONSE HEADERS -
HTTP/1.1 404 Not Found
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Length: 957
Date: Mon, 31 Oct 2016 08:58:46 GMT --------------

大功告成。

C# winform的WebBrowser非常规编程(强烈推荐)的更多相关文章

  1. WinForm中WebBrowser的使用

    最近由于工作需要,研究了下Winform的WebBrowser控件,在这里给大家分享下. 1.WebBrowser导航 WebBrowser在进行导航的时候需要用到Navigate(string ur ...

  2. C# winform调用WebBrowser经典怪问题总结

    原文:C# winform调用WebBrowser经典怪问题总结 最近一直研究网页数据采集,单单采集数据,其实HtmlAgilityPack就足够了. 对HtmlAgilityPack感兴趣的可以到这 ...

  3. WinForm使用WebBrowser操作HTML页面的Element

    前言 在 Window Form 应用程序如果需要浏览网页时可以崁入 WebBrowser 控件,但如果需要操作崁入的 HTML 的网页元素,就需要额外的操作,以下纪录几种操作 HTML 元素的方法以 ...

  4. [WinForm] 使用 WebBrowser 操作 HTML 頁面的 Element-摘自网络

    前言 在 Window Form 應用程式如果需要瀏覽網頁時可以崁入 WebBrowser 控制項,但如果需要操作崁入的 HTML 的網頁元素,就需要額外的操作,以下紀錄幾種操作 HTML 元素的方法 ...

  5. VB编程技巧推荐

    VB编程技巧推荐   1.zyl910的专栏——理论水平高 用VB写高效的图像处理程序 V2.0 优化分支代码——避免跳转指令堵塞流水线 2.Laviewpbt的专栏 —— 有很多算法的代码,实用性高 ...

  6. .Net2.0 --Winform结合WebBrowser控件和Socket老技术来实现另类Push~

    原文:.Net2.0 --Winform结合WebBrowser控件和Socket老技术来实现另类Push~ 目前的企业级开发比较流行的是Web2.0技术,但是由于Web技术基于请求--响应的交互模式 ...

  7. php语言基础语法与编程工具推荐

    php脚本语言,需要在服务器端执行,用浏览器返回HTML结果.在PHP中所有的语法都是如此,用户端是无法修改的,只有浏览权限. 一.php基础语法之输出方法 1.PHP中所有的脚本,可以放在文件中的任 ...

  8. Winform 通过 WebBrowser 与 JS 交互

    Winform 通过 WebBrowser 与 JS 交互 魏刘宏 2019.08.17 之前在使用 Cef (可在 Winform 或 WPF 程序中嵌入 Chrome 内核的网页浏览器的组件)时, ...

  9. 浏览器自动化的一些体会5 webBrowser控件之winform和webBrowser的交互

    从winform访问webBrowser,大致就是利用webBrowser提供的解析dom的方法以及用InvokeScript方法执行javascript.这个相对比较简单. 从webBrowser访 ...

随机推荐

  1. 评估Divide and Conquer算法时间复杂度的几种策略

    算法导论的第四章对于divide-conquer进行了阐述, 感觉这本书特别在,实际给出的例子并不多,更多其实是一些偏向数学性质的分析, 最重要的是告诉你该类算法分析的一般性策略. 估计 首先是估计算 ...

  2. 巧用Javascript中的slice()

    slice()是Javascript中Array的一个方法,定义是这样的. arrayObject.slice(start,end)作用是从原数组中从start到end位置截取出一个新的数组,返回值是 ...

  3. struts2获得请求参数的方式

    1.用Action的属性接收参数 2.用DomainModel(域模型)接收参数 3.用ModelDriven接收参数 使用这种方式接受参数需要实现ModelDriven接口,

  4. 关于checkbox与文字混排无法对齐的解决方法

    先前代码如下 <span style="vertical-align:middle"><input  type="checkbox" name ...

  5. Java学习笔记 第一章 入门<转>

    第一章 JAVA入门 一.基础常识 1.软件开发 什么是软件? 软件:一系列按照特定顺序组织的计算机数据和指令的集合 系统软件:DOS,Windows,Linux 应用软件:扫雷.QQ.迅雷 什么是开 ...

  6. DevExpress组件之——PopupMenu组件(转)

    出处:http://www.cnblogs.com/xlx0210/archive/2010/07/14/1777366.html 目录在项目中使用了第三方控件DevExpress,得开始研究其他控件 ...

  7. cmd

    ExecuteNonQuery  返回影响的行数 ExecuteScalar       返回第一行第一列

  8. 如何卸除SDL TRADOS中的自开发插件

    去年学着用SDL的例子编译了一个名为SimpleText的插件,每次打开TRADOS 2014时都要提示三次加载插件,很是烦人.但我想卸掉时,却无从下手,不知道怎么办.这个问题纠缠了我很久,今晨心性比 ...

  9. 1.一起来学hibernate之hibernate简介

    一.简介 Hibernate,是一个开源的ORM框架.所谓的ORM,即object relative mapping,就是对象关系映射. 那什么是对象关系映射? 对象,即java类,又称为实体类,对象 ...

  10. csc一些命令简记

    C#在命令行进行编译的一些命令: csc使用详解 @echo off cd / cd C:\Program Files (x86)\MSBuild\12.0\Bin set /p var= 请输入文件 ...