You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doing QC on the source TSV file, I found it's missing quite a few IP ranges. I recommend utilizing a different source. The ip2location lite ASN DB appears to be complete, updated monthly: https://lite.ip2location.com/database-asn
Here is a modified version of the shell script if you decide to adopt it. One benefit is there would no longer be a need for ipcalc. The download would be similar (sign-up and token required), using unzip instead of gzip. There are licensing restrictions/attribution to consider if deciding to use ip2location.
Process ASN.txt and output asn-preprocess.txt (IPv4 only)
I don't see any licence issues as long as we don't plan on redistributing the licence. There would however need to be a PR supporting this and a comparison.
Doing QC on the source TSV file, I found it's missing quite a few IP ranges. I recommend utilizing a different source. The ip2location lite ASN DB appears to be complete, updated monthly:
https://lite.ip2location.com/database-asn
Here is a modified version of the shell script if you decide to adopt it. One benefit is there would no longer be a need for ipcalc. The download would be similar (sign-up and token required), using unzip instead of gzip. There are licensing restrictions/attribution to consider if deciding to use ip2location.
Process ASN.txt and output asn-preprocess.txt (IPv4 only)
cat ~/ASN.txt | grep -v '^#' | awk '{print $1}' | grep '^AS' | while read asn; do$4 == '$ {asn:2}') print $3}' ~/IP2LOCATION-LITE-ASN.CSV >> ~/asn-preprocess.txt
echo "Processing $asn"
awk -F "","" '{if(
done
Make sure all addresses are valid and properly formatted, outputting ipv4.txt
perl cleanup.pl ~/asn-preprocess.txt | grep -E '/(2[0-4]|1[0-9]|[0-9])$' > ~/ipv4.txt
The text was updated successfully, but these errors were encountered: