Free GeoIP Lookups – Accuracy

My shell script I use to lookup geoip information recently started failing on the json.tool jq portions and instead of trying to fix it I rewrote it in python. The original shell script leveraged api.ipgeolocation.io, which turned out to be fairly inaccurate on the information returned.  Original Shell Script Code (API Key is if you register with the site located in Lahore, PK) #!/bin/shif [ $# -ne 1 ] then echo “Usage: geoip.sh ip_address”exit 1fiAPI_KEY=redactedcurl -sS –request GET \ –url ‘api.ipgeolocation.io/ipgeo?apiKey=’$API_KEY’&ip=’$1 \| python3 -m json.tool | \jq ‘{ip: .ip, isp: .isp, city: .city, state_province: .state_prov, region_code: .region_code, country_name: .country_name, country_code:…

Read More