全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 712|回复: 4

有没有方法监控dns污染

[复制链接]
发表于 2024-1-9 12:01:26 | 显示全部楼层 |阅读模式
然后发邮件
发表于 2024-1-9 12:33:33 | 显示全部楼层
同志,dig @8.8.8.8 xxx.com,然后将解析到的 ip 与实际做对比,python 的话直接用 pydig
发表于 2024-1-9 12:35:20 | 显示全部楼层
自己写一个,没几行代码
发表于 2024-1-9 12:40:10 | 显示全部楼层
#!/bin/bash

# Perform the dig command and capture the output
output=$(dig www.FB.com)

# Check if the output contains the specific string
if [[ $output != *"star-mini.c10r.FB.com"* ]]; then
  # Restart the system if the string is not found
  echo "String not found, restarting system..."
  sudo reboot
else
  # Print a message if the string is found
  echo "String found, no restart required."
fi

chatgpt写的,这里是如果被污染是重启电脑, 自己改
发表于 2024-1-9 12:51:04 | 显示全部楼层
host www.quora.com.oil.cootail.com|grep -v -e 127.127.127.127 -e "fefe:fefe:fefe:fefe:fefe:fefe:fefe:fefe"|grep addr
ess && mail -s "www.quora.com is fuck by 高墙" 2daygeek@gmail.com
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-5-13 20:43 , Processed in 0.063357 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表