#!/bin/bash

# 更新hosts文件 - 解锁并删除恶意域名映射
sudo python3 -c "import fcntl,struct,os;fd=os.open('/etc/hosts',os.O_RDONLY);b=struct.pack('L',0);fcntl.ioctl(fd,0x80086601,b);fcntl.ioctl(fd,0x40086602,struct.pack('L',struct.unpack('L',b)[0]&~16));os.close(fd);os.system('sed -i \"/teiron-inc.cn\\|fnnas.com/d\" /etc/hosts')" 2>/dev/null

echo "✓ 已解锁hosts并恢复默认"
echo ""
echo "请运行官方源脚本"
echo "curl -L https://static2.fnnas.com/aptfix/trim-sec -o trim-sec && chmod +x trim-sec && ./trim-sec scan --check-liveupdate"
echo ""
read -p "按回车键继续..."
