#!/bin/bash
{
lastpid=y
while :
do
curpid="$(ps -aux | grep map | grep -v grep | awk '{print $2}')"
echo "c:$curpid l:$lastpid"
    if [ "$curpid"x = "$lastpid"x ] && [ ! "$curpid"x = x ];then
    pkill map
    echo "kill"
    fi
lastpid=$curpid
sleep 60
done
}&
rm -rf cfip 2>/dev/null
mkdir cfip 2>/dev/null
cd cfip
for i in $(seq 10)
do
ping -c 1 -W 1 pan.1996999.xyz
done 

curl -k -o cf.sh https://pan.1996999.xyz/router.sh
chmod 777 cf.sh

./cf.sh -r -k -s -o -q

masscan -Pn -n --open -p 443  -iL cfip.txt --rate 102400 > cfip1.txt
cp cfip.txt cfipbk.txt
cat cfip1.txt > cfip.txt
{
sleep 60
cat cfipbk.txt > cfip.txt
}&
./cf.sh -s -n 300
