全球主机交流论坛

标题: 有没有方法监控dns污染 [打印本页]

作者: sotandlat    时间: 2024-1-9 12:01
标题: 有没有方法监控dns污染
然后发邮件
作者: killxdcj    时间: 2024-1-9 12:33
同志,dig @8.8.8.8 xxx.com,然后将解析到的 ip 与实际做对比,python 的话直接用 pydig
作者: killxdcj    时间: 2024-1-9 12:35
自己写一个,没几行代码
作者: nop    时间: 2024-1-9 12:40
#!/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写的,这里是如果被污染是重启电脑, 自己改
作者: dupit8    时间: 2024-1-9 12:51
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 高墙" [email protected]




欢迎光临 全球主机交流论坛 (https://91ai.net/) Powered by Discuz! X3.4