Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using just sed to filter the data #448

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion data/get_latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,14 @@ fi
if [ ! -f public_suffix_list.dat ]; then
echo "[+] Getting latest Public suffix list"
wget -N -q https://publicsuffix.org/list/public_suffix_list.dat
cat public_suffix_list.dat | grep -i -e '^/' -v | awk 'NF' | sed 's/\*\.//g' > public_suffix_list.clean.txt
sed -r '{
# removing lines with sentences (which need spaces)
/ /d
# removing blank lines
/^\s*$/d
# getting just valid suffix, "*.foo.com" should be "foo.com"
s/\*\.//g
}' public_suffix_list.dat > public_suffix_list.clean.txt
rm public_suffix_list.dat
fi

Expand Down