判断一个ip是否为搜索引擎或者蜘蛛

devtools 文章 2022-08-31 22:02 838 0 全屏看文

AI助手支持GPT4.0

三叔提供了工具:

https://www.devtools.cn/zhanzhang/spider/

image.png

具体原理如下:

实现原理

部分官方已明确给出了确定真实蜘蛛的方法,比如百度官网所说,可以使用dns反向解析,可以确认正确的蜘蛛,比如:


E:\bugscansplit>nslookup 220.181.108.80

服务器:  public1.114dns.com

Address:  114.114.114.114


名称:    baiduspider-220-181-108-80.crawl.baidu.com

Address:  220.181.108.80

那么后缀为.baidu.com的就是真实的蜘蛛,其他同理,都有相应的反向域名后缀标志,通过收集这些后缀,就形成了这个工具!


以下是收集一部分的搜索引擎的特征

搜索引擎 user-agent 备注

百度 Baiduspider/2.0

Baiduspider-image

常见百度旗下同类型蜘蛛还有下面这些:Baiduspider-mobile(抓取wap)、Baiduspider-image(抓取图片)、Baiduspider-video(抓取视频)、Baiduspider-news(抓取新闻)


百度蜘蛛IP:

220.181.108.76 ~ 220.181.108.187

123.125.71.92 ~ 123.125.71.113

Bing bingbot/2.0

Bing蜘蛛IP:

157.55.39.97 ~ 157.55.39.98

40.77.167.36 ~ 40.77.167.87

207.46.13.1 ~ 207.46.13.255

Google Googlebot/2.1

Google蜘蛛IP:

66.249.74.78 ~ 66.249.74.80

66.249.71.53 ~ 66.249.71.124

66.249.65.93 ~ 66.249.65.99

搜狗sogou Sogou+web+spider/4.0

搜狗蜘蛛IP:

61.135.189.97 ~ 61.135.189.98

123.126.113.189

神马搜索 Yisouspider

原属一搜蜘蛛。


神马搜索IP:

42.156.137.103

360搜索 360Spider

360搜索蜘蛛IP:

180.153.232.*

180.153.234.*

180.153.236.*

180.163.220.*

42.236.101.*

今日头条 Bytespider

今日头条蜘蛛IP:

111.225.149.2 ~ 111.225.149.249

110.249.202.2 ~ 110.249.202.249

Yahoo Yahoo!

Yahoo蜘蛛IP:

68.180.230.46、68.180.228.253

以下是收集一部分的未知的爬虫特征

爬虫名称 user-agent 特征 备注

The Knowledge AI The+Knowledge+AI

爬虫IP:

66.160.140.174 ~ 64.62.252.179

66.160.140.184 ~ 66.160.140.188

AhrefsBot AhrefsBot/6.1

AhrefsBot是一个营销网站的爬取蜘蛛,负责分析网站信息。(建议禁止这些IP)

爬虫IP:

54.36.148.1 ~ 54.36.148.254

54.36.149.1 ~ 54.36.149.254

54.36.150.1 ~ 54.36.150.254

SemrushBot SemrushBot/6~bl

SemrushBot也是一个营销网站的爬取蜘蛛,负责分析网站信息。(建议禁止这些IP)

爬虫IP:

46.229.168.136 ~ 46.229.168.162


-EOF-

AI助手支持GPT4.0