TODO isSameLAN
This commit is contained in:
parent
6b7c43828d
commit
81d17708ad
|
@ -36,7 +36,8 @@ timestamp=$(date -u +%s%N | cut -b1-13)
|
|||
#echo "FORGET /home/$YOU/.zen/ipfs_swarm/ from my SWARM peers"
|
||||
# rm -Rf /home/$YOU/.zen/ipfs_swarm/.*
|
||||
# rm -Rf /home/$YOU/.zen/ipfs_swarm/*
|
||||
rm -f /tmp/treated.ipfs.swarm
|
||||
rm /tmp/treated.ipfs.swarm
|
||||
touch /tmp/treated.ipfs.swarm
|
||||
|
||||
count=1
|
||||
for peerline in $(ipfs swarm peers && cat ~/.zen/A_swarm_map.txt | sort | uniq);
|
||||
|
@ -45,12 +46,12 @@ do
|
|||
[[ "$ipfsnodeid" == "" ]] && continue
|
||||
whoisg1=$(~/.zen/astrXbian/zen/tools/ipfs_to_g1.py $ipfsnodeid)
|
||||
|
||||
## IS $ipfsnodeid Already Treated ?
|
||||
[[ $(cat /tmp/treated.ipfs.swarm | grep $ipfsnodeid ) ]] && continue
|
||||
|
||||
ip=$(echo "$peerline" | awk -F '/' '{print $3}')
|
||||
isLAN=$(echo $ip | cut -f3 -d '/' | grep -E "(^127\.)|(^192\.168\.)|(^fd42\:)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
|
||||
## IS $ipfsnodeid Already Treated ?
|
||||
[[ $(cat /tmp/treated.ipfs.swarm | grep $ipfsnodeid ) ]] && continue
|
||||
|
||||
nowdate=$(date)
|
||||
|
||||
echo "### ANALYSING $whoisg1 = $ipfsnodeid ($ip) ###"
|
||||
|
|
Loading…
Reference in New Issue