Created
September 11, 2013 08:43
-
-
Save digizeph/6520927 to your computer and use it in GitHub Desktop.
one-line command to extract coordinate from the given domain name. geopy python packet is needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for var in "$@"; do python -c "from geopy import geocoders as gc; from sys import ar gv;_,lat = gc.GoogleV3().geocode(' '.join(argv[1:])); print lat[0],lat[1]" $(whois $ (nslookup $var|grep Address|sed -n 2p| cut -f 2|sed 's/#.*//') | grep 'City\|State' | awk '{print $2}' | xargs -n 2) ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment