mirror of
https://github.com/bettercap/bettercap
synced 2025-07-30 11:40:33 -07:00
27 lines
534 B
Bash
27 lines
534 B
Bash
#!/bin/sh
|
|
|
|
#pull the official TLD list, remove comments and blanks, reverse each line, then sort
|
|
words=`curl -# https://www.publicsuffix.org/list/effective_tld_names.dat |
|
|
grep -v "^//" |
|
|
grep -v "^\$" |
|
|
grep -v "^!" |
|
|
grep -v "^*" |
|
|
rev |
|
|
sort`
|
|
|
|
#convert each line into Go strings
|
|
strings=`for w in $words; do
|
|
echo " \"$w\","
|
|
done`
|
|
|
|
#output the generated file
|
|
echo "package tld
|
|
//generated on '`date -u`'
|
|
|
|
//list contains all TLDs reversed, then sorted
|
|
var list = []string{
|
|
$strings
|
|
}
|
|
|
|
var count = len(list)
|
|
" > parse_list.go
|