Skip to content

Commit

Permalink
build: use mawk instead of sed
Browse files Browse the repository at this point in the history
  • Loading branch information
jarelllama authored Feb 9, 2025
1 parent bf7af8f commit 28967b3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/build_lists.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ build() {
dir="$DOMAINS"
: > "${dir}/${output_file}"
append_header '#' 'Wildcard Domains'
sed 's/[|\^]//g' compiled.tmp >> "${dir}/${output_file}"
mawk '{ gsub (/[|^]/, ""); print }' compiled.tmp \
>> "${dir}/${output_file}"
}

# Append the header onto the blocklist.
Expand Down
25 changes: 24 additions & 1 deletion scripts/retrieve_domains.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,32 @@

# Array of sources used to retrieve domains
readonly -a SOURCES=(

source_165antifraud
source_aa419
source_behindmlm
source_BugsFighter
source_coi.gov.cz
source_cybersquatting
source_dga_detector
source_emerging_threats
source_fakewebshoplisthun
source_greatis
source_gridinsoft
source_jeroengui
source_jeroengui_nrd
source_manual
source_pcrisk
source_phishstats
source_puppyscams
source_regex
source_scamadviser
source_scamdirectory
source_stopgunscams
source_unit42
source_viriback_tracker
source_vzhh
source_wipersoft
source_google_search
)
readonly FUNCTION='bash scripts/tools.sh'
readonly RAW='data/raw.txt'
Expand Down

0 comments on commit 28967b3

Please sign in to comment.