mirror of
https://github.com/pezkuwichain/phishing.git
synced 2026-04-22 06:48:04 +00:00
Check for unique entries (#62)
* Check for unique entries * Update scripts/sortAll.mjs * Updated CHANGELOG * 0.4
This commit is contained in:
+12
-3
@@ -1,19 +1,28 @@
|
||||
# CHANGELOG
|
||||
|
||||
## master
|
||||
## 0.4.1 Jan 24, 2021
|
||||
|
||||
Contributed:
|
||||
|
||||
- Added polkadot-wallet.com (Thanks to https://github.com/FlorianFranzen)
|
||||
- Added 4dot.net, polkadots.network, polkadotwallet-unlock.org (Thanks to https://github.com/FlorianFranzen)
|
||||
- Added polkadotunlockwallet.com, polkadot.company (Thanks to https://github.com/FlorianFranzen)
|
||||
- Added dot4.org, getpolkadot.net (Thanks to https://github.com/FlorianFranzen)
|
||||
- Added dotevent.org, polkadot.center, polkadotlive.network (Thanks to https://github.com/FlorianFranzen)
|
||||
- Added polkadot.express (Thanks to https://github.com/laboon)
|
||||
- Added polkadot-airdrop.org, polkadot-live.online, walletsynchronization.com (Thanks to https://github.com/jackesky)
|
||||
|
||||
Changes:
|
||||
|
||||
- Added polkadot-airdrop.live
|
||||
- Added polkadotfund.com
|
||||
- Add `checkAddress` function to check addresses
|
||||
- Add test for sites with www prefix
|
||||
- Sort sites as part of the pre-publish build
|
||||
- Add duplicate check on CI
|
||||
- Add address.json for list of known addresses
|
||||
- Add urlmeta.json for extended info
|
||||
- Add index.html for table display from meta
|
||||
- Added polkadot-airdrop.live
|
||||
- Added polkadotfund.com
|
||||
|
||||
|
||||
## 0.3.1 Dec 13, 2020
|
||||
|
||||
+1
-1
@@ -24,5 +24,5 @@
|
||||
"@polkadot/dev": "^0.61.24",
|
||||
"@types/jest": "^26.0.20"
|
||||
},
|
||||
"version": "0.3.25"
|
||||
"version": "0.4.0"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/phishing",
|
||||
"version": "0.3.25",
|
||||
"version": "0.4.0",
|
||||
"description": "Simple phishing scripts from a central source",
|
||||
"main": "index.js",
|
||||
"module": "index.mjs",
|
||||
@@ -14,9 +14,9 @@
|
||||
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/phishing#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.12.5",
|
||||
"@polkadot/util": "^5.3.2-8",
|
||||
"@polkadot/util-crypto": "^5.3.2-8",
|
||||
"@polkadot/x-fetch": "^5.3.2-8"
|
||||
"@polkadot/util": "^5.4.1",
|
||||
"@polkadot/util-crypto": "^5.4.1",
|
||||
"@polkadot/x-fetch": "^5.4.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/js-yaml": "^4.0.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/unused",
|
||||
"version": "0.3.25",
|
||||
"version": "0.4.0",
|
||||
"description": "Dummy",
|
||||
"main": "index.js",
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
|
||||
@@ -15,6 +15,20 @@ function sortAddress (values) {
|
||||
.reduce((all, [key, addresses]) => ({ ...all, [key]: addresses }), {});
|
||||
}
|
||||
|
||||
function isUnique (type, list) {
|
||||
const others = [];
|
||||
|
||||
list.forEach((entry) => {
|
||||
if (others.includes(entry)) {
|
||||
throw new Error(`${entry} is duplicated in ${type}`);
|
||||
} else {
|
||||
others.push(entry);
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const addr = JSON.parse(fs.readFileSync('address.json', 'utf-8'));
|
||||
const all = JSON.parse(fs.readFileSync('all.json', 'utf-8'));
|
||||
const meta = JSON.parse(fs.readFileSync('urlmeta.json', 'utf-8'));
|
||||
@@ -23,6 +37,11 @@ const meta = JSON.parse(fs.readFileSync('urlmeta.json', 'utf-8'));
|
||||
const allow = sortSection(all.allow);
|
||||
const deny = sortSection(all.deny);
|
||||
|
||||
// check for unique entries
|
||||
isUnique('all.json/allow', allow);
|
||||
isUnique('all.json/deny', deny);
|
||||
isUnique('address.json', Object.keys(addr));
|
||||
|
||||
// rewrite with all our entries (newline included)
|
||||
fs.writeFileSync('address.json', `${JSON.stringify(sortAddress(addr), null, 2)}\n`);
|
||||
fs.writeFileSync('all.json', `${JSON.stringify({ allow, deny }, null, 2)}\n`);
|
||||
|
||||
@@ -1708,12 +1708,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/networks@npm:5.3.2-8":
|
||||
version: 5.3.2-8
|
||||
resolution: "@polkadot/networks@npm:5.3.2-8"
|
||||
"@polkadot/networks@npm:5.4.1":
|
||||
version: 5.4.1
|
||||
resolution: "@polkadot/networks@npm:5.4.1"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
checksum: 227a5730193f059171d0840f7c6852ce2f28fb7d41e4efe0ca400faaf73798b3c1c7ac3f5a0243f984058b1758e6d2295066e358c5f17b1971ef773ccbb2b8c5
|
||||
checksum: eb408c956c45d8f0b9808e5507a9d82baacf0a266545eb3aaa8ac41b4821497c257f062a4f7235ea39ef6aa911d0bbfadffc510c920c76e5dc49f290a2fcd50a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -1722,9 +1722,9 @@ __metadata:
|
||||
resolution: "@polkadot/phishing@workspace:packages/phishing"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
"@polkadot/util": ^5.3.2-8
|
||||
"@polkadot/util-crypto": ^5.3.2-8
|
||||
"@polkadot/x-fetch": ^5.3.2-8
|
||||
"@polkadot/util": ^5.4.1
|
||||
"@polkadot/util-crypto": ^5.4.1
|
||||
"@polkadot/x-fetch": ^5.4.1
|
||||
"@types/js-yaml": ^4.0.0
|
||||
js-yaml: ^4.0.0
|
||||
languageName: unknown
|
||||
@@ -1736,15 +1736,15 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/util-crypto@npm:^5.3.2-8":
|
||||
version: 5.3.2-8
|
||||
resolution: "@polkadot/util-crypto@npm:5.3.2-8"
|
||||
"@polkadot/util-crypto@npm:^5.4.1":
|
||||
version: 5.4.1
|
||||
resolution: "@polkadot/util-crypto@npm:5.4.1"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
"@polkadot/networks": 5.3.2-8
|
||||
"@polkadot/util": 5.3.2-8
|
||||
"@polkadot/networks": 5.4.1
|
||||
"@polkadot/util": 5.4.1
|
||||
"@polkadot/wasm-crypto": ^3.2.1
|
||||
"@polkadot/x-randomvalues": 5.3.2-8
|
||||
"@polkadot/x-randomvalues": 5.4.1
|
||||
base-x: ^3.0.8
|
||||
blakejs: ^1.1.0
|
||||
bn.js: ^4.11.9
|
||||
@@ -1756,23 +1756,23 @@ __metadata:
|
||||
tweetnacl: ^1.0.3
|
||||
xxhashjs: ^0.2.2
|
||||
peerDependencies:
|
||||
"@polkadot/util": 5.3.2-8
|
||||
checksum: d513ff19f654cf7ba151f6e3173e3e7f65d22b6589d448534aeb551c3e94d5eab13ae521c407a58689a29fe6663b746f4b4eeb5679625d09d3a2b890ae6e682c
|
||||
"@polkadot/util": 5.4.1
|
||||
checksum: 8c69e90c945164d510b310e428f79afed3a6ddd2d3132762fc4021239ee61c125bf30e84b008b580515a79e42bfdbcd3dfbb974da34633418157af71f5184c15
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/util@npm:5.3.2-8, @polkadot/util@npm:^5.3.2-8":
|
||||
version: 5.3.2-8
|
||||
resolution: "@polkadot/util@npm:5.3.2-8"
|
||||
"@polkadot/util@npm:5.4.1, @polkadot/util@npm:^5.4.1":
|
||||
version: 5.4.1
|
||||
resolution: "@polkadot/util@npm:5.4.1"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
"@polkadot/x-textdecoder": 5.3.2-8
|
||||
"@polkadot/x-textencoder": 5.3.2-8
|
||||
"@polkadot/x-textdecoder": 5.4.1
|
||||
"@polkadot/x-textencoder": 5.4.1
|
||||
"@types/bn.js": ^4.11.6
|
||||
bn.js: ^4.11.9
|
||||
camelcase: ^5.3.1
|
||||
ip-regex: ^4.2.0
|
||||
checksum: 897a87d1bf3d658ca840e1d63f2f3848ce42bc859a829c88012847ffc389c72f47202d4c678ee79f1eac5f99dac1f09e08809f3da5c6356fc6f5ddb653346d3d
|
||||
ip-regex: ^4.3.0
|
||||
checksum: c477c023e73cf9797a8c3274f296abf4ab3e7f64fba4c799adb61b49197d022ac53b242f1cc5acc43666f8b1e2c898c398c0f074239083cc3ead289058ecb8e6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -1808,41 +1808,41 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/x-fetch@npm:^5.3.2-8":
|
||||
version: 5.3.2-8
|
||||
resolution: "@polkadot/x-fetch@npm:5.3.2-8"
|
||||
"@polkadot/x-fetch@npm:^5.4.1":
|
||||
version: 5.4.1
|
||||
resolution: "@polkadot/x-fetch@npm:5.4.1"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
"@types/node-fetch": ^2.5.8
|
||||
node-fetch: ^2.6.1
|
||||
checksum: e6207996cfafb6e64508347194a1c0f2d56c52e0892b41bee0e9e2c73c60fc3688cf55d29f88ef32ee8942dbd5646f093b4ff904454b0a0f28361fedececfa6f
|
||||
checksum: 27a03ab3e596bbd20b54f46d2ecdb35a6c18a09968509afe6c9cedcff8f451d5b83e1b239ef485911d0d8a7699baa967f1702381240a88d00749a399bbd05a53
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/x-randomvalues@npm:5.3.2-8":
|
||||
version: 5.3.2-8
|
||||
resolution: "@polkadot/x-randomvalues@npm:5.3.2-8"
|
||||
"@polkadot/x-randomvalues@npm:5.4.1":
|
||||
version: 5.4.1
|
||||
resolution: "@polkadot/x-randomvalues@npm:5.4.1"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
checksum: dd1db83d18422b48a9fc3051ef4a3ec55ff6cf61f4ef69c723149526ca002bec314867a624c3db994fc838122eafe3d4730e20a5d262cf236454228a33b515d9
|
||||
checksum: 3d843ee29f907c81046a35b706a60d5e0cf09914ba909f9c1bd92b57abb68af42378fdb9aed71e1bfaa20b082d675c133943c2306e5d96be0d25c10f98939f98
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/x-textdecoder@npm:5.3.2-8":
|
||||
version: 5.3.2-8
|
||||
resolution: "@polkadot/x-textdecoder@npm:5.3.2-8"
|
||||
"@polkadot/x-textdecoder@npm:5.4.1":
|
||||
version: 5.4.1
|
||||
resolution: "@polkadot/x-textdecoder@npm:5.4.1"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
checksum: afe2dbb5702f95d7e054bdbdf801a943debd73b0a77d1ffd856adcf80dd41fc7f1530b6c3910b24ba67442f958d2366d57cabb233c15618eba4bc115569021ad
|
||||
checksum: c5a2d2366388ddd837553ad6f990589cfad5f8d25a16d6c1857b6c454a9c9ce7e53d52d71776f521f9ba7e03d7fd2275cb54c85468440a750c03cf7720573cb2
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/x-textencoder@npm:5.3.2-8":
|
||||
version: 5.3.2-8
|
||||
resolution: "@polkadot/x-textencoder@npm:5.3.2-8"
|
||||
"@polkadot/x-textencoder@npm:5.4.1":
|
||||
version: 5.4.1
|
||||
resolution: "@polkadot/x-textencoder@npm:5.4.1"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
checksum: 0b81d1c412442f85f529f14690af47acfe920c011622705803683b3f4ddf005935e41757238f7faf6551c50729f38e67128f00838d6b90e9eed87b83199ded99
|
||||
checksum: 3a3277d7fe33114059d714b63960f4b0ccabc03e4ea0f30fd11be0b137ccf828fb3662567f5f657ff51649ec7bd1288977333b51811eb6bb9432a0de90fc0216
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -5592,10 +5592,10 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ip-regex@npm:^4.2.0":
|
||||
version: 4.2.0
|
||||
resolution: "ip-regex@npm:4.2.0"
|
||||
checksum: 9e376018e64da89756e27d3f1b3313abc85291b5d1b5b9878f26b3934ecb04fa512116bf66b6dcd9553ba0b88af4feaaedbccd86f0ba6c05e464642ccb8504c5
|
||||
"ip-regex@npm:^4.3.0":
|
||||
version: 4.3.0
|
||||
resolution: "ip-regex@npm:4.3.0"
|
||||
checksum: 4f44f34dcfe5cfae3b79bac4b25bec81ea007c24a66a30a3a17d01eebde4fa98bb531f207590ee16e1e4721b4f8ad12f6a64ed9f49bcb4587ff13ebb7cc984a5
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user