Skip to content

Commit

Permalink
Extend to all possible doma'ins
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschipp committed Jan 18, 2018
1 parent aa93d62 commit 587286e
Show file tree
Hide file tree
Showing 2 changed files with 3,477 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tld.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
FILE=whois.conf
curl https://gist.githubusercontent.com/thde/3890aa48e03a2b551374/raw/138589bfcae4d24b31ddd61ac7886ab568a8fc28/whois.conf > $FILE
[[ -f $FILE ]] || { printf "$FILE doesn't exist!\n" && exit 1; }

# Strip characters to get TLD name only e.g. com
TLDs=$(cut -d " " -f1 whois.conf | sed -e 's/\\//' -e 's/\.//' -e 's/\$//' | egrep -v '^$|^#')

# Skip existing supported TLDs
SKIP=$(grep = ./whois/tld_regexpr.py | cut -d " " -f1)

config(){
tld="$1"

cat <<EOF
$tld = {
'extend': 'com',
}
EOF
}

for tld in $TLDs; do
[[ $SKIP =~ .*$tld.* ]] && continue
config $tld
done
Loading

0 comments on commit 587286e

Please sign in to comment.