mirror of
https://github.com/pezkuwichain/phishing.git
synced 2026-06-20 04:31:03 +00:00
@@ -43,6 +43,12 @@ describe('checkIfDenied', (): void => {
|
|||||||
await checkIfDenied('https://polkawallets.site/something/index.html')
|
await checkIfDenied('https://polkawallets.site/something/index.html')
|
||||||
).toEqual(true);
|
).toEqual(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('returns true in list (protocol + path + #)', async (): Promise<void> => {
|
||||||
|
expect(
|
||||||
|
await checkIfDenied('https://robonomics-network-xrt.cyberfi-tech-rewards-programs-claims-erc20-token.com/myetherwallet/access-my-wallet/#/input-privatekey-mnemonic-phrase-claim-bonus')
|
||||||
|
).toEqual(true);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('checkAddress', (): void => {
|
describe('checkAddress', (): void => {
|
||||||
|
|||||||
@@ -112,8 +112,7 @@ export async function checkAddress (address: string | Uint8Array, allowCached =
|
|||||||
|
|
||||||
return entry[0];
|
return entry[0];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Exception while checking address, assuming non-phishing');
|
console.error('Exception while checking address, assuming non-phishing', (error as Error).message);
|
||||||
console.error(error);
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -129,8 +128,7 @@ export async function checkIfDenied (host: string, allowCached = true): Promise<
|
|||||||
|
|
||||||
return checkHost(deny, host);
|
return checkHost(deny, host);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Exception while checking host, assuming non-phishing');
|
console.error(`Exception while checking ${host}, assuming non-phishing`, (error as Error).message);
|
||||||
console.error(error);
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user