mirror of
https://github.com/pezkuwichain/phishing.git
synced 2026-07-24 20:35:44 +00:00
CI combine of keys from address.json (#183)
This commit is contained in:
@@ -98,8 +98,10 @@ function checkAll (): Promise<[string, string[]][]> {
|
|||||||
'https://claimpolkadot.com/claim/index.html',
|
'https://claimpolkadot.com/claim/index.html',
|
||||||
'https://polkadot-airdrop.org/block/index.html',
|
'https://polkadot-airdrop.org/block/index.html',
|
||||||
'https://polkadot-airdrop.online/block/index.html',
|
'https://polkadot-airdrop.online/block/index.html',
|
||||||
|
'https://polkadot-airdropevent.network/block/index.html',
|
||||||
'https://polkadot-airdrops.net/block/index.html',
|
'https://polkadot-airdrops.net/block/index.html',
|
||||||
'https://polkadot-bonus.network/block/index.html'
|
'https://polkadot-bonus.network/block/index.html',
|
||||||
|
'https://polkadot.deals/claim/index.html'
|
||||||
].map((u) => checkTag(u, 'span', 'class="real-address"')),
|
].map((u) => checkTag(u, 'span', 'class="real-address"')),
|
||||||
...[
|
...[
|
||||||
'https://polkadot-get.com/',
|
'https://polkadot-get.com/',
|
||||||
|
|||||||
+12
-1
@@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
|
||||||
|
const KNOWN_URLS = ['telegra.ph', 'twitter.com', 'youtube.com'];
|
||||||
|
|
||||||
function sortSection (values) {
|
function sortSection (values) {
|
||||||
return values.sort((a, b) => a.localeCompare(b));
|
return values.sort((a, b) => a.localeCompare(b));
|
||||||
}
|
}
|
||||||
@@ -15,6 +17,15 @@ function sortAddress (values) {
|
|||||||
.reduce((all, [key, addresses]) => ({ ...all, [key]: addresses }), {});
|
.reduce((all, [key, addresses]) => ({ ...all, [key]: addresses }), {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function addSites (deny, values) {
|
||||||
|
return Object.keys(values).reduce((deny, url) => {
|
||||||
|
!deny.includes(url) && !KNOWN_URLS.includes(url) &&
|
||||||
|
deny.push(url);
|
||||||
|
|
||||||
|
return deny;
|
||||||
|
}, deny);
|
||||||
|
}
|
||||||
|
|
||||||
function isUnique (type, list) {
|
function isUnique (type, list) {
|
||||||
const others = [];
|
const others = [];
|
||||||
|
|
||||||
@@ -35,7 +46,7 @@ const meta = JSON.parse(fs.readFileSync('urlmeta.json', 'utf-8'));
|
|||||||
|
|
||||||
// sorted order for all entries
|
// sorted order for all entries
|
||||||
const allow = sortSection(all.allow);
|
const allow = sortSection(all.allow);
|
||||||
const deny = sortSection(all.deny);
|
const deny = sortSection(addSites(all.deny, addr));
|
||||||
|
|
||||||
// check for unique entries
|
// check for unique entries
|
||||||
isUnique('all.json/allow', allow);
|
isUnique('all.json/allow', allow);
|
||||||
|
|||||||
Reference in New Issue
Block a user