Skip to content

Commit

Permalink
build: update domain regex to stricter expression
Browse files Browse the repository at this point in the history
  • Loading branch information
jarelllama authored Jan 2, 2025
1 parent 457fd4d commit c33befd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ get_domains() {
# Convert to lower case
# Remove whitelisted domains
mawk '/dns[\.|_]query/ && !/^#|content:!|startswith|offset|distance|within|pcre/' "$1" \
| grep -Po 'content:"\.?\K[[:alnum:].-]+\.[[:alnum:]-]*[a-z]{2,}[[:alnum:]-]*' \
| grep -Po 'content:"\.?\K[[:alnum:]][[:alnum:].-]*[[:alnum:]]\.[[:alnum:]-]*[a-z]{2,}[[:alnum:]-]*' \
| mawk '{print tolower($0)}' \
| grep -vxFf data/whitelist.txt \
| sort -u -o "$2"
Expand Down

0 comments on commit c33befd

Please sign in to comment.