From ec9288267cdcbe07f5fb663a45ae9b61be1621b9 Mon Sep 17 00:00:00 2001 From: MDLeom <2809763-curben@users.noreply.gitlab.com> Date: Mon, 17 Mar 2025 10:37:53 +0000 Subject: [PATCH] fix: match safelink domains avoid matching path --- src/script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script.sh b/src/script.sh index 15216de7..8a5cca6c 100644 --- a/src/script.sh +++ b/src/script.sh @@ -185,7 +185,7 @@ cat "openphish.txt" "ipthreat.txt" "phishtank.txt" | \ sort -u > "phishing-temp.txt" ## Parse O365 safelink -safelinks="$(cat 'phishing-temp.txt' | grep -F 'safelinks.protection.outlook.com' || [ $? = 1 ])" +safelinks="$(cat 'phishing-temp.txt' | grep -P '^(?:[a-z]{3}\d{2}\.)?safelinks\.protection\.outlook\.com' || [ $? = 1 ])" if [ -n "$safelinks" ]; then echo "$safelinks" > "safelinks.txt"