jackyrong

  博客园 :: 首页 :: 联系 :: 订阅 订阅 :: 管理
  789 Posts :: 2 Stories :: 928 Comments :: 56 Trackbacks
今早在www.aspalliance.com上看到一篇文章(Stopping Automated Web Robots Visiting ASP/ASP.NET Websites
http://aspalliance.com/1018_Stopping_Automated_Web_Robots_Visiting_ASPASPNET_Websites),
主要是讲了下如何采取一些措施,防止robot过度去抓你的网站。看了一下,有的东西还是值得探讨下的,现归纳如下:

1、辨认ROBOT的一些参考标准
    Large numbers of requests from a single IP address or a range of IP addresses within the same subnet (i.e. the first three numbers of the IP address are identical).

·         Large numbers of requests for database driven content compared to the rest of the website.

·         Many requests made from browsers that do not support ASP Sessions.

·         Lots of and increasing numbers of website visitors, but no corresponding increase in transactions (e.g. sales!).

·         Large numbers of spam or automated requests being generated from online forms.
2、到http://www.robotstxt.org/wc/norobots.html上,可以找到一个组织提出的防御robot的建议标准(可惜这个不是什么权威标准拉,没什么约束力),在这里有一些平常我们可以用到的例子和方法,主要是搞一个robot.txt文件,放在网站根目录下,比如
User-agent: *
Disallow: /
禁止所有robot


允许所有的robot访问:

User-agent: *
Disallow:


User-agent: *
Disallow: /cyberworld/map/      不允许robot探访/cyberworld/map目录下的文件


User-agent: cybermapper    允许cybermapper这个robot
Disallow:

User-agent: *
Disallow: /cyberworld/map/
Disallow: /tmp/
Disallow: /foo.html       不允许访问foo.html这个文件了

3、如果不方便设置robot.txt的话,还可以在meta里做手脚,比如用
<meta name="robots" content="noindex, nofollow">
可以单独对某页设置防御robot

4 减慢robot的疯狂访问。如果发现robot疯狂对你的站访问,而造成效率的降低的话,可以减低
robot的访问,
User-agent: Slurp
Crawl-delay: 10

是针对yahoo的,具体可以到http://help.yahoo.com/help/us/ysearch/slurp/slurp-03.html
去看详细情况。
   但其实有的robot很智能的,有时不会那么蠢真的一拥而上地去访问。

5、如果发现不单是ROBOT,是有恶意的攻击某页的话,文章中说可以找

http://www.peterblum.com/VAM/VISETools.aspx#SDM.
这个工具试试

   当然,之前好象CNBLOGS也受到ROBOT的困扰,因此欢迎各位多发表意见,提下自己的一些
办法。






posted on 2006-09-26 10:08 jackyrong的世界 阅读(1392) 评论(2)  编辑 收藏 网摘 所属分类: .NET网络安全等

Feedback

#1楼  2006-09-26 13:44 嘻哈呵嘿      
其它的robot还好,sogou的最疯狂。。每秒一次。
  回复  引用  查看    

#2楼  2006-09-27 09:03 Icebird      
可以设置陷阱,因为robot会解析并访问所有的链接,那么在某一页设置一个正常人不可能去点击的链接,记录下所有访问这个链接的IP,如果超过一定的次数,则自动将其IP加入到屏蔽列表中
  回复  引用  查看    





标题  
姓名  
主页
Email (博主才能看到) 
验证码 *  看不清,换一张 [登录][注册]
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
Google站内搜索
[推荐职位]上海盛大网络招聘架构师

China-pub 计算机图书网上专卖店!6.5万品种 2-8折!
近千种 9-95 新二手计算图书火热销售中!
开发者征途系统新作:《设计模式——基于C#的工程化实现及扩展》

相关文章:

相关链接:

历史上的今天:
2005-09-26 快速了解c#中的索引器