瀏覽代碼

Chore: Update Phishing Hosts Score

SukkaW 1 年之前
父節點
當前提交
38bcd58466
共有 1 個文件被更改,包括 18 次插入13 次删除
  1. 18 13
      Build/lib/get-phishing-domains.ts

+ 18 - 13
Build/lib/get-phishing-domains.ts

@@ -185,14 +185,15 @@ const processPhihsingDomains = cache(function processPhihsingDomains(domainArr:
       || (domainScoreMap[apexDomain] >= 13 && count >= 11)
       || (domainScoreMap[apexDomain] >= 5 && count >= 14)
       || (domainScoreMap[apexDomain] >= 3 && count >= 21)
+      || (domainScoreMap[apexDomain] >= 1 && count >= 60)
     ) {
       domainArr.push('.' + apexDomain);
     }
   });
 
   // console.log({
-  //   score: domainScoreMap['flk-ipfs.xyz'],
-  //   count: domainCountMap.get('flk-ipfs.xyz')
+  //   score: domainScoreMap['awicksin.com'],
+  //   count: domainCountMap.get('awicksin.com')
   // });
 
   // console.log({ duplicateCount, domainArrLen: domainArr.length });
@@ -247,20 +248,24 @@ export function calcDomainAbuseScore(subdomain: string, fullDomain: string = sub
 
   const subdomainLength = subdomain.length;
 
-  if (subdomainLength > 13) {
-    weight += 0.2;
-    if (subdomainLength > 20) {
-      weight += 1;
-      if (subdomainLength > 30) {
-        weight += 5;
-        if (subdomainLength > 40) {
-          weight += 10;
+  if (subdomainLength > 6) {
+    weight += 0.015;
+
+    if (subdomainLength > 13) {
+      weight += 0.2;
+      if (subdomainLength > 20) {
+        weight += 1;
+        if (subdomainLength > 30) {
+          weight += 5;
+          if (subdomainLength > 40) {
+            weight += 10;
+          }
         }
       }
-    }
 
-    if (subdomain.indexOf('.', 1) > 1) {
-      weight += 1;
+      if (subdomain.indexOf('.', 1) > 1) {
+        weight += 1;
+      }
     }
   }