主要是想做一个软件,不用打开网站,从数据库中将里面的文章分别发至不同的网站
当然,是我自己弄得网站
我看到很多自动发帖机软件。论坛群发什么的都是这个原理不过感觉比较麻烦,我这里是自己的,就免去验证码识别等复杂技术了
只要完成登录,发贴,退出,登录下一个网站,发贴,退出。下面是我抓的数据包,作为例子首先是登录POST /user.asp?Action=chklogin HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Referer: http://localhost/user.asp
Accept-Language: zh-cn
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
Host: localhost
Content-Length: 72
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: VFGNLVCWIGESOGSOGQOG=RVFBSTEJMIBASYKZGOZWTHEGYCCJAZOEABGVDICO; DreamSun_Post_tieba200=; AJSTAT_ok_times=3; AJSTAT_ok_pages=13username=admin&pwd=admin&zd_code=5864&baoliu=&comurl=&login=%B5%C7%C2%BCHTTP/1.1 200 OK
Server: NetBox Version 2.8 Build 4128
Date: Sun, 11 Apr 2010 14:28:00 GMT
Connection: Keep-Alive
Set-Cookie: DreamSun_Post_tieba200=username=admin&rnd=shqdxsm5crdg4hj02o; path=/
Cache-control: private
Content-Type: text/html
Content-Length: 1460<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>会员中心-追梦阳光贴吧官方网站</title>
<meta name="Copyright" content="追梦阳光动力" />
<meta name="keywords" content="追梦阳光贴吧 专业程序开发制作" />
<meta name="description" content="追梦阳光贴吧2.0是一款短小精悍的ASP信息资讯发布展示系统,他集成了留言本的便捷,CMS的实用,论坛的交互性于一体。" />
<link href="skins/200/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="images/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="images/js.js"></script>
</head>
<body>
<div id="header">
<div class="wrap s_clear">
<h2><a href="index.asp"><img src="skins/200/logo.png" border="0" /></a></h2>
<div id="umenu"><A href='user.asp'>登录</A> | <A href='user.asp?Action=reg'>注册</A> | <a href='user.asp?Action=restorePwd' title='按此找回密码'>忘记密码?</a></div>
<div id="ad_headerbanner">TieBa_AD_Top<!-- 广告位置 --></div>
<div id="menu">
<ul></ul>
</div>
</div>
</div>
<div id="nav"><span><ul></ul></span><div id="navpr"><a href="index.asp">追梦阳光贴吧官方网站</a> » 会员中心</div></div>
<div id="wrapper" class="wrap s_clear">
<script>alert('恭喜,登录成功!当前积分17分');window.location.replace('index.asp');</Script>这个是发贴的数据包POST /tzsave.asp?cz=addsave HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Referer: http://localhost/index.asp
Accept-Language: zh-cn
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
Host: localhost
Content-Length: 169
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: VFGNLVCWIGESOGSOGQOG=RVFBSTEJMIBASYKZGOZWTHEGYCCJAZOEABGVDICO; DreamSun_Post_tieba200=username=admin&rnd=shqdxsm5crdg4hj02o; AJSTAT_ok_times=3; AJSTAT_ok_pages=17BoardId=2&isRe=1&title=%B2%E2%CA%D4&titleBold=0&titlecolor=&content=%B2%E2%CA%D4%C4%DA%C8%DD%B7%B4%B7%B4%B8%B4%B8%B4%B7%B4%B7%B4%B8%B4%B8%B4%B7%A2%B7%A2&zd_code=dreamsunHTTP/1.1 200 OK
Server: NetBox Version 2.8 Build 4128
Date: Sun, 11 Apr 2010 14:31:14 GMT
Connection: Keep-Alive
Cache-control: private
Content-Type: text/html
Content-Length: 106<script>alert('恭喜您!帖子发表成功,您获得发帖积分2分');window.location.replace('show.asp?id=7');</Script>
GET /show.asp?id=7 HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: zh-cn
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
Host: localhost
Connection: Keep-Alive
Cookie: VFGNLVCWIGESOGSOGQOG=RVFBSTEJMIBASYKZGOZWTHEGYCCJAZOEABGVDICO; DreamSun_Post_tieba200=username=admin&rnd=shqdxsm5crdg4hj02o; AJSTAT_ok_times=3; AJSTAT_ok_pages=17HTTP/1.1 200 OK
Server: NetBox Version 2.8 Build 4128
Date: Sun, 11 Apr 2010 14:31:21 GMT
Connection: Keep-Alive
Cache-control: private
Content-Type: text/html
Content-Length: 6069<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>测试-站长交易-追梦阳光贴吧官方网站</title>
<meta name="Copyright" content="追梦阳光动力" />
<meta name="keywords" content="测试,站长交易,追梦阳光贴吧官方网站,追梦阳光贴吧 专业程序开发制作" />
<meta name="description" content="追梦阳光贴吧2.0是一款短小精悍的ASP信息资讯发布展示系统,他集成了留言本的便捷,CMS的实用,论坛的交互性于一体。" />
<link href="skins/200/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="images/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="images/js.js"></script>
</head>
<body>代码太长了,把返回的网页内容删除了
</body>
</html>GET /go.asp?svid=4&id=3492964&tpages=18&ttimes=3&tzone=8&tcolor=32&sSize=1024,768&referrer=&vpage=http%3A//localhost/show.asp%3Fid%3D7 HTTP/1.1
Accept: */*
Referer: http://localhost/show.asp?id=7
Accept-Language: zh-cn
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
Host: web1.51.la:82
Connection: Keep-AliveHTTP/1.1 200 OK
Date: Sun, 11 Apr 2010 14:31:22 GMT
Server: Microsoft-IIS/6.0
Content-Length: 0
Content-Type: text/html
Expires: Sat, 10 Apr 2010 21:51:22 GMT
Cache-control: private
GET /ajax.asp?a=get_msg_num&b=0.5419377791476334 HTTP/1.1
x-requested-with: XMLHttpRequest
Accept-Language: zh-cn
Referer: http://localhost/show.asp?id=7
Accept: text/html, */*
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
Host: localhost
Connection: Keep-Alive
Cookie: VFGNLVCWIGESOGSOGQOG=RVFBSTEJMIBASYKZGOZWTHEGYCCJAZOEABGVDICO; DreamSun_Post_tieba200=username=admin&rnd=shqdxsm5crdg4hj02o; AJSTAT_ok_times=3; AJSTAT_ok_pages=18HTTP/1.1 200 OK
Server: NetBox Version 2.8 Build 4128
Date: Sun, 11 Apr 2010 14:31:21 GMT
Connection: Keep-Alive
Cache-control: private
Content-Type: text/html;charset=gb2312
Content-Length: 0
[/code]
当然,是我自己弄得网站
我看到很多自动发帖机软件。论坛群发什么的都是这个原理不过感觉比较麻烦,我这里是自己的,就免去验证码识别等复杂技术了
只要完成登录,发贴,退出,登录下一个网站,发贴,退出。下面是我抓的数据包,作为例子首先是登录POST /user.asp?Action=chklogin HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Referer: http://localhost/user.asp
Accept-Language: zh-cn
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
Host: localhost
Content-Length: 72
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: VFGNLVCWIGESOGSOGQOG=RVFBSTEJMIBASYKZGOZWTHEGYCCJAZOEABGVDICO; DreamSun_Post_tieba200=; AJSTAT_ok_times=3; AJSTAT_ok_pages=13username=admin&pwd=admin&zd_code=5864&baoliu=&comurl=&login=%B5%C7%C2%BCHTTP/1.1 200 OK
Server: NetBox Version 2.8 Build 4128
Date: Sun, 11 Apr 2010 14:28:00 GMT
Connection: Keep-Alive
Set-Cookie: DreamSun_Post_tieba200=username=admin&rnd=shqdxsm5crdg4hj02o; path=/
Cache-control: private
Content-Type: text/html
Content-Length: 1460<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>会员中心-追梦阳光贴吧官方网站</title>
<meta name="Copyright" content="追梦阳光动力" />
<meta name="keywords" content="追梦阳光贴吧 专业程序开发制作" />
<meta name="description" content="追梦阳光贴吧2.0是一款短小精悍的ASP信息资讯发布展示系统,他集成了留言本的便捷,CMS的实用,论坛的交互性于一体。" />
<link href="skins/200/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="images/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="images/js.js"></script>
</head>
<body>
<div id="header">
<div class="wrap s_clear">
<h2><a href="index.asp"><img src="skins/200/logo.png" border="0" /></a></h2>
<div id="umenu"><A href='user.asp'>登录</A> | <A href='user.asp?Action=reg'>注册</A> | <a href='user.asp?Action=restorePwd' title='按此找回密码'>忘记密码?</a></div>
<div id="ad_headerbanner">TieBa_AD_Top<!-- 广告位置 --></div>
<div id="menu">
<ul></ul>
</div>
</div>
</div>
<div id="nav"><span><ul></ul></span><div id="navpr"><a href="index.asp">追梦阳光贴吧官方网站</a> » 会员中心</div></div>
<div id="wrapper" class="wrap s_clear">
<script>alert('恭喜,登录成功!当前积分17分');window.location.replace('index.asp');</Script>这个是发贴的数据包POST /tzsave.asp?cz=addsave HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Referer: http://localhost/index.asp
Accept-Language: zh-cn
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
Host: localhost
Content-Length: 169
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: VFGNLVCWIGESOGSOGQOG=RVFBSTEJMIBASYKZGOZWTHEGYCCJAZOEABGVDICO; DreamSun_Post_tieba200=username=admin&rnd=shqdxsm5crdg4hj02o; AJSTAT_ok_times=3; AJSTAT_ok_pages=17BoardId=2&isRe=1&title=%B2%E2%CA%D4&titleBold=0&titlecolor=&content=%B2%E2%CA%D4%C4%DA%C8%DD%B7%B4%B7%B4%B8%B4%B8%B4%B7%B4%B7%B4%B8%B4%B8%B4%B7%A2%B7%A2&zd_code=dreamsunHTTP/1.1 200 OK
Server: NetBox Version 2.8 Build 4128
Date: Sun, 11 Apr 2010 14:31:14 GMT
Connection: Keep-Alive
Cache-control: private
Content-Type: text/html
Content-Length: 106<script>alert('恭喜您!帖子发表成功,您获得发帖积分2分');window.location.replace('show.asp?id=7');</Script>
GET /show.asp?id=7 HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: zh-cn
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
Host: localhost
Connection: Keep-Alive
Cookie: VFGNLVCWIGESOGSOGQOG=RVFBSTEJMIBASYKZGOZWTHEGYCCJAZOEABGVDICO; DreamSun_Post_tieba200=username=admin&rnd=shqdxsm5crdg4hj02o; AJSTAT_ok_times=3; AJSTAT_ok_pages=17HTTP/1.1 200 OK
Server: NetBox Version 2.8 Build 4128
Date: Sun, 11 Apr 2010 14:31:21 GMT
Connection: Keep-Alive
Cache-control: private
Content-Type: text/html
Content-Length: 6069<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>测试-站长交易-追梦阳光贴吧官方网站</title>
<meta name="Copyright" content="追梦阳光动力" />
<meta name="keywords" content="测试,站长交易,追梦阳光贴吧官方网站,追梦阳光贴吧 专业程序开发制作" />
<meta name="description" content="追梦阳光贴吧2.0是一款短小精悍的ASP信息资讯发布展示系统,他集成了留言本的便捷,CMS的实用,论坛的交互性于一体。" />
<link href="skins/200/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="images/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="images/js.js"></script>
</head>
<body>代码太长了,把返回的网页内容删除了
</body>
</html>GET /go.asp?svid=4&id=3492964&tpages=18&ttimes=3&tzone=8&tcolor=32&sSize=1024,768&referrer=&vpage=http%3A//localhost/show.asp%3Fid%3D7 HTTP/1.1
Accept: */*
Referer: http://localhost/show.asp?id=7
Accept-Language: zh-cn
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
Host: web1.51.la:82
Connection: Keep-AliveHTTP/1.1 200 OK
Date: Sun, 11 Apr 2010 14:31:22 GMT
Server: Microsoft-IIS/6.0
Content-Length: 0
Content-Type: text/html
Expires: Sat, 10 Apr 2010 21:51:22 GMT
Cache-control: private
GET /ajax.asp?a=get_msg_num&b=0.5419377791476334 HTTP/1.1
x-requested-with: XMLHttpRequest
Accept-Language: zh-cn
Referer: http://localhost/show.asp?id=7
Accept: text/html, */*
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
Host: localhost
Connection: Keep-Alive
Cookie: VFGNLVCWIGESOGSOGQOG=RVFBSTEJMIBASYKZGOZWTHEGYCCJAZOEABGVDICO; DreamSun_Post_tieba200=username=admin&rnd=shqdxsm5crdg4hj02o; AJSTAT_ok_times=3; AJSTAT_ok_pages=18HTTP/1.1 200 OK
Server: NetBox Version 2.8 Build 4128
Date: Sun, 11 Apr 2010 14:31:21 GMT
Connection: Keep-Alive
Cache-control: private
Content-Type: text/html;charset=gb2312
Content-Length: 0
[/code]
还有说 WebRequest 的
谁能给个详细的源代码啊