mirror of
https://github.com/pezkuwichain/phishing.git
synced 2026-05-01 07:48:01 +00:00
Remove *.fleek.co domains (#1475)
* Remove *.fleek.co domains * Also add to additions * Wildcard matching
This commit is contained in:
@@ -5336,8 +5336,6 @@
|
||||
"startofficial.net",
|
||||
"stepn.plus",
|
||||
"stepns.pro",
|
||||
"storageapi.fleek.co",
|
||||
"storageapi2.fleek.co",
|
||||
"stratos.medium.cn.com",
|
||||
"stratos.medium.com.ru",
|
||||
"stratos.polkastarter.com.es",
|
||||
|
||||
@@ -10,6 +10,10 @@ const allowed = JSON.parse(fs.readFileSync('known.json', 'utf-8')) as Record<str
|
||||
const all = JSON.parse(fs.readFileSync('all.json', 'utf8')) as { allow: string[]; deny: string[] };
|
||||
|
||||
const TOP_LEVEL = [
|
||||
// wildcards
|
||||
'*.fleek.co', // storageapi.fleek.co, storageapi2.fleek.co
|
||||
|
||||
// root domains
|
||||
'ddns.net',
|
||||
'herokuapp.com',
|
||||
'hopto.org',
|
||||
@@ -64,7 +68,13 @@ describe('added addresses', (): void => {
|
||||
|
||||
describe('added urls', (): void => {
|
||||
it('has no entries for allowed top-level domains', (): void => {
|
||||
const invalids = all.deny.filter((u) => TOP_LEVEL.includes(u));
|
||||
const invalids = all.deny.filter((u) =>
|
||||
TOP_LEVEL.some((t) =>
|
||||
t.startsWith('*.')
|
||||
? (u.endsWith(t.substring(1)) || u === t.substring(2))
|
||||
: u === t
|
||||
)
|
||||
);
|
||||
|
||||
expect(invalids).toEqual([]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user