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批量抓取百度首页真实网址
  • 怎么禁止虚假百度蜘蛛?
  • 热门搜索
    如何打包文件 excel怎么打分数 换驾照去哪里 四川古镇旅游景点大全 如何看水表 新鲜槐花怎么吃 上饶旅游景点大全 如何学习唱歌 如何注册邮箱 如何制作app