shell批量检查IP是否是百度蜘蛛

 时间:2026-02-15 00:25:02

1、 案例展示

# cat u_ex161127.log|grep Baiduspider|head -1

u_ex161127.log 是日志文件

shell批量检查IP是否是百度蜘蛛

2、收集所有的Baiduspider的ip,展示前10个。

# cat u_ex161127.log|grep Baiduspider|awk '{print $9}'|sort|uniq|head -10

shell批量检查IP是否是百度蜘蛛

3、将所有IP存入ip.txt

# cat u_ex161127.log|grep Baiduspider|awk '{print $9}'|sort|uniq > ip.txt

查看ip.txt中的ip数量

# cat ip.txt|wc -l

shell批量检查IP是否是百度蜘蛛

1、# 反查ip命令

nslookup ip

shell批量检查IP是否是百度蜘蛛

2、# 批量检查ip是否是真实Baiduspider,存入Baidu-ip.txt

# cat ip.txt|while read line;do nslookup $line|grep baiduspider|awk -F "baiduspider-" '{print $2}'|awk -F "." '{print $1}'|sed 's/-/\./g';done > baidu-ip.txt

注:while .. ;do ...;done 是循环语句

shell批量检查IP是否是百度蜘蛛

  • 怎样识别百度蜘蛛?
  • 批量引蜘蛛软件
  • 百度蜘蛛ip段大全分析
  • shell批量抓取百度首页真实网址
  • 怎么禁止虚假百度蜘蛛?
  • 热门搜索
    低俗生活 保靖生活网 怎么在电脑上看光盘 宝宝磨牙怎么回事 暂住证如何办理 从零开始的异世界生活 如何投资商铺 qq红包怎么提现 大雁的生活习性 手淫是什么