Answer the question
In order to leave comments, you need to log in
Where can I get a list of networks in Kazakhstan?
I found a list of networks in Russia noc.masterhost.ru/allrunet/runet
I found a list of networks in Ukraine www.colocall.net/ua/prefixes.txt
I found a list of networks in Belarus www.datacenter.by/ip/bynets.txt
I can not find a list of networks in Kazakhstan.
Answer the question
In order to leave comments, you need to log in
#!/bin/bash
[ -f GeoIPCountryCSV.zip ] || wget -T 5 -t 1 geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip
echo -n "Creating CBE (Country,Begin,End) CSV file..."
unzip -p GeoIPCountryCSV.zip GeoIPCountryWhois.csv | grep Kazakhstan | awk -F \" '{print $10","$6","$8}' > cbe.csv
echo -ne "DONE\nGenerating file..."
(for c in $(awk -F, '{print $1} ' cbe.csv | sort -u)
do
grep "^$c," cbe.csv | awk -F, 'function s(b,e,l,m,n) {l = int(log(e-b+ 1)/log(2)); m = 2^32-2^l; n = and(m,e); if (n == and(m,b)) printf "%u.%u.%u .%u/%u \n",b/2^24%256,b/2^16%256,b/2^8%256,b%256,32-l; else {s(b,n- 1); s(n,e)}} s($2,$3)'
done) > kz.networks
rm -f cbe.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question