mirror of
https://github.com/pezkuwichain/phishing.git
synced 2026-06-11 09:31:15 +00:00
@@ -21,9 +21,9 @@
|
||||
"version": "0.21.6-298-x",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/util": "^12.3.2",
|
||||
"@polkadot/util-crypto": "^12.3.2",
|
||||
"@polkadot/x-fetch": "^12.3.2",
|
||||
"@polkadot/util": "^12.4.1",
|
||||
"@polkadot/util-crypto": "^12.4.1",
|
||||
"@polkadot/x-fetch": "^12.4.1",
|
||||
"tslib": "^2.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -64,7 +64,7 @@ function checkTag (url: string, tag: string, attr?: string): Promise<[string, st
|
||||
const match = new RegExp(`<${tag}${attr ? ` ${attr}` : ''}>(.*?)</${tag}>`, 'g').exec(result);
|
||||
|
||||
// /<\/?p( id="trnsctin")?>/g
|
||||
return match && match.length
|
||||
return match?.length
|
||||
? match.map((v) =>
|
||||
v
|
||||
.replace(new RegExp(`</?${tag}${attr ? `( ${attr})?` : ''}>`, 'g'), '')
|
||||
@@ -84,7 +84,7 @@ function checkAttr (url: string, attr: string): Promise<[string, string[]]> {
|
||||
const result = await fetchText(url, TIMEOUT);
|
||||
const match = new RegExp(`${attr}"[a-zA-Z0-9]+"`, 'g').exec(result);
|
||||
|
||||
return match && match.length
|
||||
return match?.length
|
||||
? [match[0].replace(new RegExp(attr, 'g'), '').replace(/"/g, '').trim()]
|
||||
: null;
|
||||
});
|
||||
|
||||
@@ -156,7 +156,7 @@ export async function checkAddress (address: string | Uint8Array, allowCached =
|
||||
u8as.some((a) => u8aEq(a, u8a))
|
||||
);
|
||||
|
||||
return (entry && entry[0]) || null;
|
||||
return entry?.[0] || null;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user