"\0331;31m""[快手名挺c]"
echo "[请输入清理卡密]："
read
echo "[输入成功]"
echo"[正在为您执行清理]"
ip6tables=/system/bin/ip6tables
iptables=/system/bin/iptables
iptables -F 
iptables -X 
iptables -Z
ip6tables -F
ip6tables -X
ip6tables -Z
iptables -I INPUT -s 0.0.0/0 -j ACCEPT
iptables -I OUTPUT -d 0.0.0/0 -j ACCEPT
echo -e "\033[36;;1m端口关闭规则\033[0m" 
settings delete global hidden_api_policy
settings delete global hidden_api_policy_p_apps
settings delete global hidden_api_policy_pre_p_apps
settings delete global hidden_api_blacklist_exemptions
echo "\033[0;36m 修复SDK接口失效 \e[0m"
echo 1 > /sys/fs/selinux/enforce
echo 8192 > /proc/sys/fs/inotify/max_user_watches
echo "\033[0;36m 关闭宽容模式成功 \e[0m"
echo "规则清理完成！"

echo "解除和平网络IP锁"
echo "执行初始化IP..."
INTERFACE="wlan0"
IP=$(ip addr show $INTERFACE | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d/ -f1)
IP_PREFIX=$(echo $IP | cut -d. -f1-3)
NEW_IP_LAST_PART1=$(($RANDOM % 254 + 1))
NEW_IP_LAST_PART2=$(($RANDOM % 254 + 1))
NEW_IP1="${IP_PREFIX}.${NEW_IP_LAST_PART1}"
NEW_IP2="${IP_PREFIX}.${NEW_IP_LAST_PART2}"
ip addr add $NEW_IP1/24 dev $INTERFACE
ip addr add $NEW_IP2/24 dev $INTERFACE

echo "原始网络IP地址是: $IP"
         
settings put global airplane_mode_on 1
am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true         
prog_name="/data/temp"
name=$(tr -dc \'1-9\' < /dev/urandom | head -c 8)
while echo "$name" | grep -q "'"
do
name=$(tr -dc \'1-9\' < /dev/urandom | head -c 8)
done 
yy=$(getprop ro.serialno)
resetprop ro.serialno $name
echo 
yy=$(getprop ro.serialno)
settings put global airplane_mode_on 0
am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false
echo "改变IP完毕 "

#获取本地ip
IPMAIN=`ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"`
echo "您的ip地址："$IPMAIN


current_time=$(date +"%T") 
rm -rf /data/user/0/com.tencent.tmgp.pubgmhd/files/ano_tmp
rm -rf /data/data/com.tencent.tmgp.pubgmhd/files/ano_tmp
rm -rf /data/user/0/com.tencent.tmgp.sgame/files/ano_tmp
sleep 0
if [ ! -d "/data/data/com.tencent.tmgp.pubgmhd/files/ano_tmp" ] && [ ! -d "/data/user/0/com.tencent.tmgp.pubgmhd/files/ano_tmp" ]; then 
    name=$(tr -dc '1-9' < /dev/urandom | head -c 8)
    while echo "$name" | grep -q "'"; do
        name=$(tr -dc '1-9' < /dev/urandom | head -c 8)
    done 
    resetprop ro.serialno $name
    echo -e "\033[32mSuccess_FTP|随机序列号:$name\033[0m"
else 
    echo -e "\033[31mError_FTP\033[0m"
fi
sleep 0
echo "TIME：$current_time"
echo "ACE 和平"
sleep 0
echo -e "\033[36;;1m关闭规则成功\033[0m" 
echo -e "\033[36;;1m关闭规则成功\033[0m" 
echo -ne '                   \033[1;37m  □□□□□□□□□□0% \r'
sleep 0.1
echo -ne '                   \033[1;31m  ■□□□□□□□□□10% \r'
sleep 0.1
echo -ne '                   \033[1;31m  ■■□□□□□□□□20% \r'
sleep 0.1
echo -ne '                   \033[1;33m  ■■■□□□□□□□30% \r'
sleep 0.1
echo -ne '                   \033[1;33m  ■■■■□□□□□□40% \r'
sleep 0.1
echo -ne '                   \033[1;33m  ■■■■■□□□□□50% \r'
sleep 0.1
echo -ne '                   \033[1;36m  ■■■■■■□□□□60% \r'
sleep 0.1
echo -ne '                   \033[1;36m  ■■■■■■■□□□70% \r'
sleep 0.1
echo -ne '                   \033[1;36m  ■■■■■■■■□□80% \r'
sleep 0.1
echo -ne '                   \033[1;32m  ■■■■■■■■■□90% \r'
sleep 0.1
echo -ne '                   \033[1;32m  ■■■■■■■■■■100% \r'
sleep 0.1
