diff tld.conf @ 248:b0738685bf51

latest tld list; fix uninitialized variable
author Carl Byington <carl@five-ten-sg.com>
date Fri, 06 Jan 2012 22:07:45 -0800
parents 44ffef730bc4
children f92f24950bd3
line wrap: on
line diff
--- a/tld.conf	Fri Sep 30 15:38:19 2011 -0700
+++ b/tld.conf	Fri Jan 06 22:07:45 2012 -0800
@@ -1,5 +1,5 @@
 #
-# icann tlds from http://www.icann.org/registries/listing.html as of 2008-04-30
+# icann tlds from http://www.icann.org/registries/listing.html as of 2012-01-06
 #
 aero
 asia
@@ -18,17 +18,25 @@
 name
 net
 org
+post
 pro
 tel
 travel
+xxx
 
 #
-# iana root tlds from http://www.iana.org/cctld/cctld-whois.htm as of 2008-04-30
+# iana root tlds from http://www.iana.org/domains/root/db/ as of 2012-01-06
 #
-# curl http://www.iana.org/domains/root/db/ 2>/dev/null | \
-#   grep root.db.*country-code | \
-#     sed -e 's/.*root.db.\(..\)\.html.*code.........\([^<]*\)<.*/\1  # \2/g' | \
-#       sort >yyy
+curl http://www.iana.org/domains/root/db/ 2>/dev/null | \
+grep '<td>.*' | (\
+while read tld; do
+    read ty
+    read name
+    tld=$(echo $tld | sed -r -e 's/^.*\/db\/(.*)\.html.*$/\1/g')
+    ty=$(echo $ty | sed -r -e 's/^.*<td>(.*)<\/td>.*$/\1/g')
+    name=$(echo $name | sed -r -e 's/^.*<td>(.*)<br\/>.*$/\1/g')
+    [ $ty == "country-code" ] && echo "$tld  # $name"
+done ) | sort >yyy
 #
 ac  # Ascension Island
 ad  # Andorra
@@ -38,7 +46,7 @@
 ai  # Anguilla
 al  # Albania
 am  # Armenia
-an  # Netherlands Antilles
+an  # Netherlands Antilles (being phased out)
 ao  # Angola
 aq  # Antarctica
 ar  # Argentina
@@ -61,6 +69,7 @@
 bm  # Bermuda
 bn  # Brunei Darussalam
 bo  # Bolivia
+bq  # Bonaire, Sint Eustatius and Saba
 br  # Brazil
 bs  # Bahamas
 bt  # Bhutan
@@ -74,7 +83,7 @@
 cf  # Central African Republic
 cg  # Congo
 ch  # Switzerland
-ci  # Cote d'Ivoire
+ci  # Cote d&#39;Ivoire
 ck  # Cook Islands
 cl  # Chile
 cm  # Cameroon
@@ -83,6 +92,7 @@
 cr  # Costa Rica
 cu  # Cuba
 cv  # Cape Verde
+cw  # CuraƧao
 cx  # Christmas Island
 cy  # Cyprus
 cz  # Czech Republic
@@ -151,12 +161,12 @@
 ki  # Kiribati
 km  # Comoros
 kn  # Saint Kitts and Nevis
-kp  # Korea, Democratic People's Republic of
+kp  # Korea, Democratic People&#39;s Republic of
 kr  # Korea, Republic of
 kw  # Kuwait
 ky  # Cayman Islands
 kz  # Kazakhstan
-la  # Lao People's Democratic Republic
+la  # Lao People&#39;s Democratic Republic
 lb  # Lebanon
 lc  # Saint Lucia
 li  # Liechtenstein
@@ -166,7 +176,7 @@
 lt  # Lithuania
 lu  # Luxembourg
 lv  # Latvia
-ly  # Libyan Arab Jamahiriya
+ly  # Libya
 ma  # Morocco
 mc  # Monaco
 md  # Moldova, Republic of
@@ -238,9 +248,11 @@
 sn  # Senegal
 so  # Somalia
 sr  # Suriname
+ss  # South Sudan
 st  # Sao Tome and Principe
 su  # Soviet Union (being phased out)
 sv  # El Salvador
+sx  # Sint Maarten (Dutch part)
 sy  # Syrian Arab Republic
 sz  # Swaziland
 tc  # Turks and Caicos Islands
@@ -258,7 +270,7 @@
 tr  # Turkey
 tt  # Trinidad and Tobago
 tv  # Tuvalu
-tw  # Taiwan
+tw  # Taiwan, Province of China
 tz  # Tanzania, United Republic of
 ua  # Ukraine
 ug  # Uganda
@@ -269,16 +281,53 @@
 uz  # Uzbekistan
 va  # Holy See (Vatican City State)
 vc  # Saint Vincent and the Grenadines
-ve  # Venezuela
+ve  # Venezuela, Bolivarian Republic of
 vg  # Virgin Islands, British
 vi  # Virgin Islands, U.S.
 vn  # Viet Nam
 vu  # Vanuatu
 wf  # Wallis and Futuna
 ws  # Samoa
+xn--3e0b707e  # Korea, Republic of
+xn--45brj9c  # India
+xn--54b7fta0cc  # Bangladesh
+xn--80ao21a  # Kazakhstan
+xn--90a3ac  # Serbia
+xn--clchc0ea0b2g2a9gcd  # Singapore
+xn--fiqs8s  # China
+xn--fiqz9s  # China
+xn--fpcrj9c3d  # India
+xn--fzc2c9e2c  # Sri Lanka
+xn--gecrj9c  # India
+xn--h2brj9c  # India
+xn--j1amh  # Ukraine
+xn--j6w193g  # Hong Kong
+xn--kprw13d  # Taiwan, Province of China
+xn--kpry57d  # Taiwan, Province of China
+xn--lgbbat1ad8j  # Algeria
+xn--mgb9awbf  # Oman
+xn--mgba3a4f16a  # Iran, Islamic Republic of
+xn--mgbaam7a8h  # United Arab Emirates
+xn--mgbai9azgqp6j  # Pakistan
+xn--mgbayh7gpa  # Jordan
+xn--mgbbh1a71e  # India
+xn--mgbc0a9azcg  # Morocco
+xn--mgberp4a5d4ar  # Saudi Arabia
+xn--mgbx4cd0ab  # Malaysia
+xn--node  # Georgia
+xn--o3cw4h  # Thailand
+xn--ogbpf8fl  # Syrian Arab Republic
+xn--p1ai  # Russian Federation
+xn--pgbs0dh  # Tunisia
+xn--s9brj9c  # India
+xn--wgbh1c  # Egypt
+xn--wgbl6a  # Qatar
+xn--xkc2al3hye2a  # Sri Lanka
+xn--xkc2dl3a5ee0h  # India
+xn--yfro4i67o  # Singapore
+xn--ygbi2ammx  # Palestinian Territory, Occupied
 ye  # Yemen
 yt  # Mayotte
-yu  # Yugoslavia
 za  # South Africa
 zm  # Zambia
 zw  # Zimbabwe