mirror of
https://github.com/pezkuwichain/phishing.git
synced 2026-06-11 15:21:11 +00:00
Adjust wildcard check & add problematic <url>.on.fleek.co (#1871)
* Adjust wildcard check & add problematic <url>.on.fleek.co * Adjust
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
"1token-im.com",
|
||||
"1v4t96knneojmqrl1rblweebvongdgjsd657zqwqzs6jmdspolkadot.js.org",
|
||||
"1vsoumsoosby8aazwusucqrysh7lakimcneijp8shsj8x6bpolkadot.js.org",
|
||||
"interfacevalidation.on.fleek.co",
|
||||
"2022-gift.com",
|
||||
"23.254.132.67",
|
||||
"247metamaskrapidresponse.com",
|
||||
|
||||
@@ -12,6 +12,7 @@ const all = JSON.parse(fs.readFileSync('all.json', 'utf8')) as { allow: string[]
|
||||
const TOP_LEVEL = [
|
||||
// wildcards
|
||||
'*.fleek.co', // storageapi.fleek.co, storageapi2.fleek.co
|
||||
'on.fleek.co',
|
||||
|
||||
// root domains
|
||||
'ddns.net',
|
||||
@@ -74,7 +75,8 @@ describe('added urls', (): void => {
|
||||
it('has no entries for allowed top-level domains', (): void => {
|
||||
const invalids = all.deny.filter((u) =>
|
||||
TOP_LEVEL.some((t) =>
|
||||
t.startsWith('*.')
|
||||
// for *. count the parts before the check
|
||||
(t.startsWith('*.') && (u.split('.').length === t.split('.').length))
|
||||
? (u.endsWith(t.substring(1)) || u === t.substring(2))
|
||||
: u === t
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user