Skip to content

Commit

Permalink
select recheck
Browse files Browse the repository at this point in the history
  • Loading branch information
txthinking committed Mar 27, 2015
1 parent 7b3e433 commit 72a1b91
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions scripts/select.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,30 @@ do
do
ip=$(echo $line | awk '{print $1}')
c=$(nmap --host-timeout 2s $ip -p 443 2>/dev/null | grep -Pc "443/tcp open")
if [ $c -ge 1 ]
if [ $c -ne 1 ]
then
echo $line
break
echo "NMAP warn $domain $ip"
continue
fi
cer=$(curl https://$ip 2>&1 | grep -Po "'\S*'" |head -1|cut -d \' -f 2)
if [ $cer != $domain ]
then
echo "CURL warn $domain $ip"
continue
fi
_ip=$ip
done < $filter_data

if [ -z "$line" ]
then
echo "[WARNING] $domain"
continue
fi
if [ -z "$_ip" ]
then
echo "[WARNING] $domain"
continue
fi
./use.sh $domain $ip

if [ $domain != "*.mail.google.com" ]
Expand Down

0 comments on commit 72a1b91

Please sign in to comment.