fix: pipe extracted stdout to parsing

This commit is contained in:
MDLeom 2025-03-19 11:13:16 +00:00
parent 89e8f56702
commit 693d996267
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
1 changed files with 2 additions and 4 deletions

View File

@ -134,9 +134,7 @@ fi
## Parse URLs
if [ -n "$(file 'phishtank.bz2' | grep 'bzip2 compressed data')" ]; then
bunzip2 -kc "phishtank.bz2" > "phishtank.csv"
cat "phishtank.csv" | \
bunzip2 -kc "phishtank.bz2" | \
tr "[:upper:]" "[:lower:]" | \
## Workaround for column with double quotes
"./$CSVQUOTE" | \
@ -422,7 +420,7 @@ sed "2s/Domains Blocklist/Hosts Blocklist (IE)/" > "../public/phishing-filter.tp
## Clean up artifacts
rm "phishtank.csv" "top-1m-umbrella.zip" "top-1m-umbrella.txt" "top-1m-tranco.txt" "openphish-raw.txt" "cf/" "top-1m-radar.txt"
rm "phishtank.bz2" "top-1m-umbrella.zip" "top-1m-umbrella.txt" "top-1m-tranco.txt" "openphish-raw.txt" "cf/" "top-1m-radar.txt"
cd ../