mirror of
https://github.com/pezkuwichain/phishing.git
synced 2026-06-14 07:21:03 +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",
|
"startofficial.net",
|
||||||
"stepn.plus",
|
"stepn.plus",
|
||||||
"stepns.pro",
|
"stepns.pro",
|
||||||
"storageapi.fleek.co",
|
|
||||||
"storageapi2.fleek.co",
|
|
||||||
"stratos.medium.cn.com",
|
"stratos.medium.cn.com",
|
||||||
"stratos.medium.com.ru",
|
"stratos.medium.com.ru",
|
||||||
"stratos.polkastarter.com.es",
|
"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 all = JSON.parse(fs.readFileSync('all.json', 'utf8')) as { allow: string[]; deny: string[] };
|
||||||
|
|
||||||
const TOP_LEVEL = [
|
const TOP_LEVEL = [
|
||||||
|
// wildcards
|
||||||
|
'*.fleek.co', // storageapi.fleek.co, storageapi2.fleek.co
|
||||||
|
|
||||||
|
// root domains
|
||||||
'ddns.net',
|
'ddns.net',
|
||||||
'herokuapp.com',
|
'herokuapp.com',
|
||||||
'hopto.org',
|
'hopto.org',
|
||||||
@@ -64,7 +68,13 @@ describe('added addresses', (): void => {
|
|||||||
|
|
||||||
describe('added urls', (): void => {
|
describe('added urls', (): void => {
|
||||||
it('has no entries for allowed top-level domains', (): 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([]);
|
expect(invalids).toEqual([]);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user