From c36dedfdd5eddda0c12bb3dbfdfe4033903b06df Mon Sep 17 00:00:00 2001 From: SukkaW Date: Wed, 23 Nov 2022 21:10:16 +0800 Subject: [PATCH] Stricter Phishing domain extraction --- Build/build-phishing-domainset.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Build/build-phishing-domainset.js b/Build/build-phishing-domainset.js index 1e341dce..e2f78a22 100644 --- a/Build/build-phishing-domainset.js +++ b/Build/build-phishing-domainset.js @@ -55,7 +55,7 @@ const BLACK_TLD = Array.from(new Set([ const domain = line.charCodeAt(0) === 46 ? line.slice(1) : line; - if (domain.length > 25) { + if (domain.length > 19) { const apexDomain = tldts.getDomain(domain, { allowPrivateDomains: true }); if (apexDomain) { @@ -65,6 +65,11 @@ const BLACK_TLD = Array.from(new Set([ domainCountMap[apexDomain] ||= 0; domainCountMap[apexDomain] += 1; + + if (domain.length > 45) { + // Add more weight if the domain is long enough + domainCountMap[apexDomain] += 1; + } } } }