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

 时间:2026-04-22 02:02:17

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批量抓取百度首页真实网址
  • 怎么禁止虚假百度蜘蛛?
  • 热门搜索
    人是怎么形成的 起亚k5怎么样 感冒通打一成语是什么 袭警罪怎么判 我的世界家具怎么做 税负怎么算 不大便怎么办 怎么用电脑拍照 怎么让眼睛恢复视力 养老保险个人怎么交