mirror of
https://github.com/pezkuwichain/phishing.git
synced 2026-06-19 09:51:04 +00:00
@@ -1,9 +1,9 @@
|
||||
# @polkadot/phishing
|
||||
|
||||
```js
|
||||
import retrieveCheckDeny from '@polkadot/phishing';
|
||||
import { checkIfDenied } from '@polkadot/phishing';
|
||||
|
||||
const isOnDeny = await retrieveCheckDeny(window.location.host);
|
||||
const isOnDeny = await checkIfDenied(window.location.host);
|
||||
|
||||
console.log(`isOnDeny=${isOnDeny}`);
|
||||
```
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
{
|
||||
"name": "@polkadot/phishing",
|
||||
"version": "0.1.17",
|
||||
"version": "0.2.0",
|
||||
"description": "Simple phishing scripts from a central source",
|
||||
"main": "index.js",
|
||||
"module": "esm/index.js",
|
||||
"sideEffects": false,
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"maintainers": [],
|
||||
@@ -14,7 +13,7 @@
|
||||
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/phishing#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.12.1",
|
||||
"@polkadot/x-fetch": "^4.0.2-11"
|
||||
"@polkadot/x-fetch": "^4.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/js-yaml": "^3.12.5",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2020 @polkadot/phishing authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import checkIfDenied from '.';
|
||||
import { checkIfDenied } from '.';
|
||||
|
||||
describe('checkIfDenied', (): void => {
|
||||
it('returns false when host in list', async (): Promise<void> => {
|
||||
|
||||
@@ -48,7 +48,7 @@ export function checkHost (items: string[], host: string): boolean {
|
||||
* Determines if a host is in our deny list. Returns true if host is a problematic one. Returns
|
||||
* true if the host provided is in our list of less-than-honest sites.
|
||||
*/
|
||||
export default async function checkIfDenied (host: string): Promise<boolean> {
|
||||
export async function checkIfDenied (host: string): Promise<boolean> {
|
||||
try {
|
||||
const { deny } = await retrieveHostList();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/unused",
|
||||
"version": "0.1.17",
|
||||
"version": "0.2.0",
|
||||
"description": "Dummy",
|
||||
"main": "index.js",
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
|
||||
Reference in New Issue
Block a user