mirror of
https://github.com/pezkuwichain/phishing.git
synced 2026-06-12 22:51:06 +00:00
Extra address checks (#164)
This commit is contained in:
@@ -13,10 +13,10 @@
|
||||
"repository": "github.com:polkadot-js/phishing",
|
||||
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/phishing#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.13.9",
|
||||
"@polkadot/util": "^6.0.4",
|
||||
"@polkadot/util-crypto": "^6.0.4",
|
||||
"@polkadot/x-fetch": "^6.0.4"
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@polkadot/util": "^6.0.5",
|
||||
"@polkadot/util-crypto": "^6.0.5",
|
||||
"@polkadot/x-fetch": "^6.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/js-yaml": "^4.0.0",
|
||||
|
||||
@@ -54,7 +54,13 @@ function checkTag (url: string, tag: string, attr?: string): Promise<[string, st
|
||||
|
||||
// /<\/?p( id="trnsctin")?>/g
|
||||
return match && match.length
|
||||
? match.map((v) => v.replace(new RegExp(`</?${tag}${attr ? `( ${attr})?` : ''}>`, 'g'), '').trim())
|
||||
? match.map((v) =>
|
||||
v
|
||||
.replace(new RegExp(`</?${tag}${attr ? `( ${attr})?` : ''}>`, 'g'), '')
|
||||
.replace(/<br>/g, '')
|
||||
.replace(/<\/br>/g, '')
|
||||
.trim()
|
||||
)
|
||||
: null;
|
||||
});
|
||||
}
|
||||
@@ -114,7 +120,8 @@ function checkAll (): Promise<[string, string[]][]> {
|
||||
'https://kusama-wallet.com/wallet.php',
|
||||
'https://polkadot-wallet.org/wallet.php'
|
||||
].map((u) => checkAttr(u, 'id="copyTarget" value=')),
|
||||
checkTag('https://polkadotairdrop.com/address/', 'cool')
|
||||
checkTag('https://polkadotairdrop.com/address/', 'cool'),
|
||||
checkTag('https://polkadot-online.live/nnn/polkadot-live.online/block/index.html', 'p', 'id="t12uEsctin"')
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user