New phishing blocking domainset

This commit is contained in:
SukkaW
2022-11-01 02:24:56 +08:00
parent d26e4a4b07
commit c880ebc9f5
9 changed files with 1419 additions and 61 deletions

View File

@@ -202,6 +202,27 @@ const threads = isCI ? cpuCount : cpuCount / 2;
});
});
// Read Special Phishing Suffix list
await fsPromises.readFile(pathResolve(__dirname, '../List/domainset/reject_phishing.conf'), { encoding: 'utf-8' }).then(data => {
data.split('\n').forEach(line => {
const trimmed = line.trim();
if (
line.startsWith('#')
|| line.startsWith(' ')
|| line.startsWith('\r')
|| line.startsWith('\n')
|| trimmed === ''
) {
return;
}
/* if (domainSets.has(line) || domainSets.has(`.${line}`)) {
console.warn(`|${line}| is already in the list!`);
} */
domainSuffixSet.add(trimmed);
});
});
console.log(`Import ${domainKeywordsSet.size} black keywords and ${domainSuffixSet.size} black suffixes!`);
previousSize = domainSets.size;