mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-13 01:30:37 +08:00
Make fake TLD in Phishing Hosts lethal match
This commit is contained in:
parent
f655e54cd7
commit
a05e0ec27c
@ -45,7 +45,15 @@ export const leathalKeywords = createKeywordFilter([
|
|||||||
'inpost-pl',
|
'inpost-pl',
|
||||||
'vlnted-',
|
'vlnted-',
|
||||||
'allegrolokalnie',
|
'allegrolokalnie',
|
||||||
'thetollroads'
|
'thetollroads',
|
||||||
|
'getipass',
|
||||||
|
|
||||||
|
// Fake TLD
|
||||||
|
'.pl-',
|
||||||
|
'.com-',
|
||||||
|
'.net-',
|
||||||
|
'.org-',
|
||||||
|
'.gov-'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
export const sensitiveKeywords = createKeywordFilter([
|
export const sensitiveKeywords = createKeywordFilter([
|
||||||
@ -72,13 +80,8 @@ export const sensitiveKeywords = createKeywordFilter([
|
|||||||
'google.com-',
|
'google.com-',
|
||||||
'minecraft',
|
'minecraft',
|
||||||
'staemco',
|
'staemco',
|
||||||
'oferta'
|
'oferta',
|
||||||
]);
|
'txtag'
|
||||||
|
|
||||||
export const fakeTldKeywords = createKeywordFilter([
|
|
||||||
'.pl-',
|
|
||||||
'.com-',
|
|
||||||
'.net-'
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
export const lowKeywords = createKeywordFilter([
|
export const lowKeywords = createKeywordFilter([
|
||||||
|
|||||||
@ -34,7 +34,7 @@ const pool = new Worktank({
|
|||||||
const tldts = __require('tldts-experimental') as typeof import('tldts-experimental');
|
const tldts = __require('tldts-experimental') as typeof import('tldts-experimental');
|
||||||
|
|
||||||
const { loosTldOptWithPrivateDomains } = __require('../constants/loose-tldts-opt') as typeof import('../constants/loose-tldts-opt');
|
const { loosTldOptWithPrivateDomains } = __require('../constants/loose-tldts-opt') as typeof import('../constants/loose-tldts-opt');
|
||||||
const { BLACK_TLD, WHITELIST_MAIN_DOMAINS, leathalKeywords, lowKeywords, fakeTldKeywords, sensitiveKeywords } = __require('../constants/phishing-score-source') as typeof import('../constants/phishing-score-source');
|
const { BLACK_TLD, WHITELIST_MAIN_DOMAINS, leathalKeywords, lowKeywords, sensitiveKeywords } = __require('../constants/phishing-score-source') as typeof import('../constants/phishing-score-source');
|
||||||
|
|
||||||
const domainCountMap = new Map<string, number>();
|
const domainCountMap = new Map<string, number>();
|
||||||
const domainScoreMap: Record<string, number> = {};
|
const domainScoreMap: Record<string, number> = {};
|
||||||
@ -119,8 +119,8 @@ const pool = new Worktank({
|
|||||||
if (isDebug) {
|
if (isDebug) {
|
||||||
console.log({
|
console.log({
|
||||||
v: 1,
|
v: 1,
|
||||||
score: domainScoreMap['com-paytollbydv.world'],
|
score: domainScoreMap['com-ticketry.world'],
|
||||||
count: domainCountMap.get('com-paytollbydv.worldx'),
|
count: domainCountMap.get('com-ticketry.world'),
|
||||||
domainArrLen: domainArr.length
|
domainArrLen: domainArr.length
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -136,25 +136,14 @@ const pool = new Worktank({
|
|||||||
|
|
||||||
const hitLowKeywords = lowKeywords(fullDomain);
|
const hitLowKeywords = lowKeywords(fullDomain);
|
||||||
const sensitiveKeywordsHit = sensitiveKeywords(fullDomain);
|
const sensitiveKeywordsHit = sensitiveKeywords(fullDomain);
|
||||||
const fakeTldKeywordsHit = fakeTldKeywords(fullDomain);
|
|
||||||
|
|
||||||
if (sensitiveKeywordsHit) {
|
if (sensitiveKeywordsHit) {
|
||||||
weight += 15;
|
weight += 15;
|
||||||
if (hitLowKeywords) {
|
if (hitLowKeywords) {
|
||||||
weight += 10;
|
weight += 10;
|
||||||
if (fakeTldKeywordsHit) {
|
|
||||||
weight += 8;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// besides add for low hit, always add extra here
|
|
||||||
if (fakeTldKeywordsHit) {
|
|
||||||
weight += 10;
|
|
||||||
}
|
}
|
||||||
} else if (hitLowKeywords) {
|
} else if (hitLowKeywords) {
|
||||||
weight += 1.8;
|
weight += 2;
|
||||||
if (fakeTldKeywordsHit) {
|
|
||||||
weight += 5;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const subdomainLength = subdomain.length;
|
const subdomainLength = subdomain.length;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user