mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-13 17:50:34 +08:00
Strengthen Phishing Score Calculation
This commit is contained in:
parent
525a0948c9
commit
be2262e51b
@ -3,18 +3,21 @@ import { createRetrieKeywordFilter as createKeywordFilter } from 'foxts/retrie';
|
|||||||
export const BLACK_TLD = new Set([
|
export const BLACK_TLD = new Set([
|
||||||
'accountant', 'art', 'autos',
|
'accountant', 'art', 'autos',
|
||||||
'bar', 'beauty', 'bid', 'bio', 'biz', 'bond', 'business', 'buzz',
|
'bar', 'beauty', 'bid', 'bio', 'biz', 'bond', 'business', 'buzz',
|
||||||
'cc', 'cf', 'cfd', 'click', 'cloud', 'club', 'cn', 'codes',
|
'casa', 'cc', 'cf', 'cfd', 'click', 'cloud', 'club', 'cn', 'codes',
|
||||||
'co.uk', 'co.in', 'com.br', 'com.cn', 'com.pl', 'com.vn',
|
'co.uk', 'co.in', 'com.br', 'com.cn', 'com.pl', 'com.vn',
|
||||||
'cool', 'cricket', 'cyou',
|
'cool', 'cricket', 'cyou',
|
||||||
'date', 'design', 'digital', 'download',
|
'date', 'design', 'digital', 'download',
|
||||||
|
'email',
|
||||||
'faith', 'fit', 'fun',
|
'faith', 'fit', 'fun',
|
||||||
'ga', 'gd', 'gives', 'gq', 'group', 'host',
|
'ga', 'games', 'gd', 'gives', 'gq', 'group',
|
||||||
|
'help', 'host',
|
||||||
'icu', 'id', 'info', 'ink',
|
'icu', 'id', 'info', 'ink',
|
||||||
'lat', 'life', 'live', 'link', 'loan', 'lol', 'ltd',
|
'lat', 'life', 'live', 'link', 'loan', 'lol', 'love', 'ltd',
|
||||||
'me', 'men', 'ml', 'mobi', 'mom', 'monster',
|
'me', 'media', 'men', 'ml', 'mobi', 'movie', 'mom', 'monster',
|
||||||
'net.pl',
|
'net.pl', 'ninja',
|
||||||
'one', 'online',
|
'one', 'online',
|
||||||
'party', 'pro', 'pl', 'pw',
|
'party', 'pro', 'pl', 'pw',
|
||||||
|
'qpon', 'quest',
|
||||||
'racing', 'rest', 'review', 'rf.gd',
|
'racing', 'rest', 'review', 'rf.gd',
|
||||||
'sa.com', 'sbs', 'science', 'shop', 'site', 'skin', 'space', 'store', 'stream', 'su', 'support', 'surf',
|
'sa.com', 'sbs', 'science', 'shop', 'site', 'skin', 'space', 'store', 'stream', 'su', 'support', 'surf',
|
||||||
'tech', 'tk', 'tokyo', 'top', 'trade',
|
'tech', 'tk', 'tokyo', 'top', 'trade',
|
||||||
|
|||||||
@ -26,12 +26,10 @@ export async function fetchAssets(
|
|||||||
try {
|
try {
|
||||||
await waitWithAbort(1800 + (index + 1) * 1200, controller.signal);
|
await waitWithAbort(1800 + (index + 1) * 1200, controller.signal);
|
||||||
} catch {
|
} catch {
|
||||||
console.log(picocolors.gray('[fetch cancelled early]'), picocolors.gray(url));
|
|
||||||
throw reusedCustomAbortError;
|
throw reusedCustomAbortError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (controller.signal.aborted) {
|
if (controller.signal.aborted) {
|
||||||
console.log(picocolors.gray('[fetch cancelled]'), picocolors.gray(url));
|
|
||||||
throw reusedCustomAbortError;
|
throw reusedCustomAbortError;
|
||||||
}
|
}
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
|
|||||||
@ -105,8 +105,10 @@ const pool = new Worktank({
|
|||||||
} else {
|
} else {
|
||||||
if (BLACK_TLD.has(tld)) {
|
if (BLACK_TLD.has(tld)) {
|
||||||
score += 3;
|
score += 3;
|
||||||
} else if (tld.length > 6) {
|
} else if (tld.length > 4) {
|
||||||
score += 2;
|
score += 2;
|
||||||
|
} else if (tld.length > 5) {
|
||||||
|
score += 4;
|
||||||
}
|
}
|
||||||
if (apexDomain.length >= 18) {
|
if (apexDomain.length >= 18) {
|
||||||
score += 0.5;
|
score += 0.5;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user