mirror of
https://github.com/pezkuwichain/phishing.git
synced 2026-06-13 01:11:06 +00:00
@@ -5,7 +5,7 @@ jobs:
|
|||||||
pr:
|
pr:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
step: ['lint', 'test', 'build', 'docs']
|
step: ['lint', 'test', 'build']
|
||||||
name: ${{ matrix.step }}
|
name: ${{ matrix.step }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ jobs:
|
|||||||
master:
|
master:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
step: ['build:release', 'docs:release']
|
step: ['build:release']
|
||||||
name: ${{ matrix.step }}
|
name: ${{ matrix.step }}
|
||||||
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && github.repository == 'polkadot-js/phishing'"
|
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && github.repository == 'polkadot-js/phishing'"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -18,7 +18,6 @@ jobs:
|
|||||||
token: ${{ secrets.GH_PAT }}
|
token: ${{ secrets.GH_PAT }}
|
||||||
- name: ${{ matrix.step }}
|
- name: ${{ matrix.step }}
|
||||||
env:
|
env:
|
||||||
GH_PAGES_SRC: docs
|
|
||||||
GH_PAT: ${{ secrets.GH_PAT }}
|
GH_PAT: ${{ secrets.GH_PAT }}
|
||||||
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
|
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Please see https://github.com/polkadot-js/phishing
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"npmClient": "yarn",
|
||||||
|
"useWorkspaces": true,
|
||||||
|
"command": {
|
||||||
|
"publish": {
|
||||||
|
"allowBranch": "master"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"packages": [
|
||||||
|
"packages/*"
|
||||||
|
],
|
||||||
|
"version": "0.1.0"
|
||||||
|
}
|
||||||
+4
-5
@@ -2,6 +2,10 @@
|
|||||||
"repository": "https://github.com/polkadot-js/phishing",
|
"repository": "https://github.com/polkadot-js/phishing",
|
||||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||||
"license": "Apache-2",
|
"license": "Apache-2",
|
||||||
|
"private": true,
|
||||||
|
"workspaces": [
|
||||||
|
"packages/*"
|
||||||
|
],
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"babel-core": "^7.0.0-bridge.0",
|
"babel-core": "^7.0.0-bridge.0",
|
||||||
"typescript": "^4.0.2"
|
"typescript": "^4.0.2"
|
||||||
@@ -9,16 +13,11 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "polkadot-dev-build-ts",
|
"build": "polkadot-dev-build-ts",
|
||||||
"build:release": "polkadot-ci-ghact-build --skip-beta",
|
"build:release": "polkadot-ci-ghact-build --skip-beta",
|
||||||
"docs": "echo \"no docs build step\"",
|
|
||||||
"docs:release": "polkadot-ci-ghact-docs",
|
|
||||||
"lint": "polkadot-dev-run-lint",
|
"lint": "polkadot-dev-run-lint",
|
||||||
"clean": "polkadot-dev-clean-build",
|
"clean": "polkadot-dev-clean-build",
|
||||||
"postinstall": "polkadot-dev-yarn-only",
|
"postinstall": "polkadot-dev-yarn-only",
|
||||||
"test": "echo \"no tests\""
|
"test": "echo \"no tests\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
|
||||||
"@polkadot/x-fetch": "^0.3.2"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.11.6",
|
"@babel/core": "^7.11.6",
|
||||||
"@polkadot/dev": "^0.55.53",
|
"@polkadot/dev": "^0.55.53",
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# @polkadot/phishing
|
||||||
|
|
||||||
|
```js
|
||||||
|
import loadAndCheck from '@polkadot/phishing';
|
||||||
|
|
||||||
|
const isOnDeny = await retrieveCheckDeny(window.location.host);
|
||||||
|
|
||||||
|
console.log(`isOnDeny=${isOnDeny}`);
|
||||||
|
```
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"name": "@polkadot/phishing",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"description": "Simple phishing scripts from a central source",
|
||||||
|
"main": "index.js",
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public",
|
||||||
|
"registry": "https://registry.npmjs.org"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/polkadot-js/phishing.git"
|
||||||
|
},
|
||||||
|
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||||
|
"maintainers": [
|
||||||
|
"Jaco Greeff <jacogr@gmail.com>"
|
||||||
|
],
|
||||||
|
"contributors": [],
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/polkadot-js/phishing/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/phishing#readme",
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/runtime": "^7.11.2",
|
||||||
|
"@polkadot/x-fetch": "0.3.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,7 +14,7 @@ export async function retrieveHostList (): Promise<HostList> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// checks a host to see if it appears in the list
|
// checks a host to see if it appears in the list
|
||||||
export async function checkHost (items: string[], host: string): Promise<boolean> {
|
export function checkHost (items: string[], host: string): boolean {
|
||||||
const hostParts = host.split('.').reverse();
|
const hostParts = host.split('.').reverse();
|
||||||
|
|
||||||
return items.some((item): boolean => {
|
return items.some((item): boolean => {
|
||||||
@@ -2847,7 +2847,16 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@polkadot/x-fetch@npm:^0.3.2":
|
"@polkadot/phishing@workspace:packages/phishing":
|
||||||
|
version: 0.0.0-use.local
|
||||||
|
resolution: "@polkadot/phishing@workspace:packages/phishing"
|
||||||
|
dependencies:
|
||||||
|
"@babel/runtime": ^7.11.2
|
||||||
|
"@polkadot/x-fetch": 0.3.2
|
||||||
|
languageName: unknown
|
||||||
|
linkType: soft
|
||||||
|
|
||||||
|
"@polkadot/x-fetch@npm:0.3.2":
|
||||||
version: 0.3.2
|
version: 0.3.2
|
||||||
resolution: "@polkadot/x-fetch@npm:0.3.2"
|
resolution: "@polkadot/x-fetch@npm:0.3.2"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -15352,7 +15361,6 @@ fsevents@^1.2.7:
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@babel/core": ^7.11.6
|
"@babel/core": ^7.11.6
|
||||||
"@polkadot/dev": ^0.55.53
|
"@polkadot/dev": ^0.55.53
|
||||||
"@polkadot/x-fetch": ^0.3.2
|
|
||||||
"@types/jest": ^26.0.10
|
"@types/jest": ^26.0.10
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|||||||
Reference in New Issue
Block a user