From 693d9962672f193342a2290e345113627f298b08 Mon Sep 17 00:00:00 2001 From: MDLeom <2809763-curben@users.noreply.gitlab.com> Date: Wed, 19 Mar 2025 11:13:16 +0000 Subject: [PATCH] fix: pipe extracted stdout to parsing --- src/script.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/script.sh b/src/script.sh index fa392985..fd056d1c 100644 --- a/src/script.sh +++ b/src/script.sh @@ -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 ../