Visit the site below for a useful script to sort, filter, and get country codes for your proxy lists. Script will process your entire proxy list, up to 5,000 proxies at a time. Non-numeric entries such as hostnames will be considered invalid (so you'll need to resolve them first), and duplicate entries will be removed.
Note: You can also
filter Planetlab/CoDeen proxies here. Just tick the appropriate box.
Code:
http://www.ipmaster.org/ip2cc.html