@sapphire/phisherman 0.1.0-next.68fba03.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,24 @@
1
+ # The MIT License (MIT)
2
+
3
+ Copyright © `2020` `The Sapphire Community and its contributors`
4
+
5
+ Permission is hereby granted, free of charge, to any person
6
+ obtaining a copy of this software and associated documentation
7
+ files (the “Software”), to deal in the Software without
8
+ restriction, including without limitation the rights to use,
9
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the
11
+ Software is furnished to do so, subject to the following
12
+ conditions:
13
+
14
+ The above copyright notice and this permission notice shall be
15
+ included in all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
18
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24
+ OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,126 @@
1
+ <div align="center">
2
+
3
+ ![Sapphire Logo](https://cdn.skyra.pw/gh-assets/sapphire-banner.png)
4
+
5
+ # @sapphire/phisherman
6
+
7
+ **Wrapper around [Phisherman](https://phisherman.gg) to easily check and report domains**
8
+
9
+ [![GitHub](https://img.shields.io/github/license/sapphiredev/utilities)](https://github.com/sapphiredev/utilities/blob/main/LICENSE.md)
10
+ [![codecov](https://codecov.io/gh/sapphiredev/utilities/branch/main/graph/badge.svg?token=QWL8FB16BR)](https://codecov.io/gh/sapphiredev/utilities)
11
+ [![npm bundle size](https://img.shields.io/bundlephobia/min/@sapphire/phisherman?logo=webpack&style=flat-square)](https://bundlephobia.com/result?p=@sapphire/phisherman)
12
+ [![npm](https://img.shields.io/npm/v/@sapphire/phisherman?color=crimson&logo=npm&style=flat-square)](https://www.npmjs.com/package/@sapphire/phisherman)
13
+
14
+ </div>
15
+
16
+ ## Description
17
+
18
+ With @sapphire/phisherman, you can have an out of the box integration with [Phisherman](https://phisherman.gg). Phisherman is a centralised database of phishing and scam links. It is designed for use with Discord bots, allowing them to utilise the Phisherman API to cross-check URLs against our known phishing links.
19
+
20
+ Note: Phisherman is currently in early access. For more information or to request access, please visit their [discord server](https://discord.gg/QwrpmTgvWy).
21
+
22
+ ## Features
23
+
24
+ - Fully ready for TypeScript!
25
+ - Includes ESM ready entrypoint
26
+ - Easy to use
27
+
28
+ ## Installation
29
+
30
+ You can use the following command to install this package, or replace `npm install` with your package manager of choice.
31
+
32
+ ```sh
33
+ npm install @sapphire/phisherman
34
+ ```
35
+
36
+ ---
37
+
38
+ ## Usage
39
+
40
+ **Note:** While this section uses `import`, it maps 1:1 with CommonJS' require syntax. For example, `import { check } from '@sapphire/phisherman'` is the same as `const { checkDomain } = require('@sapphire/phisherman')`.
41
+
42
+ Before you do anything make sure to set the apiKey like this:
43
+
44
+ ```typescript
45
+ import { setApiKey } from '@sapphire/phisherman';
46
+
47
+ setApiKey('your-api-key');
48
+ ```
49
+
50
+ The main use you will have for phisherman is checking whether an URL is safe or not. You can do so with:
51
+
52
+ ```typescript
53
+ import { checkDomain } from '@sapphire/phisherman';
54
+
55
+ checkDomain('some-domain');
56
+ ```
57
+
58
+ If you have an URL that didn't pass the check, but you are sure is actually a phishing site, you can use the following to report it to phisherman:
59
+
60
+ ```typescript
61
+ import { reportDomain } from '@sapphire/phisherman';
62
+
63
+ reportDomain('some-domain');
64
+ ```
65
+
66
+ ## Buy us some doughnuts
67
+
68
+ Sapphire Community is and always will be open source, even if we don't get donations. That being said, we know there are amazing people who may still want to donate just to show their appreciation. Thank you very much in advance!
69
+
70
+ We accept donations through Open Collective, Ko-fi, Paypal, Patreon and GitHub Sponsorships. You can use the buttons below to donate through your method of choice.
71
+
72
+ | Donate With | Address |
73
+ | :-------------: | :-------------------------------------------------: |
74
+ | Open Collective | [Click Here](https://sapphirejs.dev/opencollective) |
75
+ | Ko-fi | [Click Here](https://sapphirejs.dev/kofi) |
76
+ | Patreon | [Click Here](https://sapphirejs.dev/patreon) |
77
+ | PayPal | [Click Here](https://sapphirejs.dev/paypal) |
78
+
79
+ ## Contributors ✨
80
+
81
+ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
82
+
83
+ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
84
+ <!-- prettier-ignore-start -->
85
+ <!-- markdownlint-disable -->
86
+ <table>
87
+ <tr>
88
+ <td align="center"><a href="https://favware.tech/"><img src="https://avatars3.githubusercontent.com/u/4019718?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jeroen Claassens</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=favna" title="Code">💻</a> <a href="#infra-favna" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#projectManagement-favna" title="Project Management">📆</a> <a href="https://github.com/sapphiredev/utilities/commits?author=favna" title="Documentation">📖</a> <a href="https://github.com/sapphiredev/utilities/commits?author=favna" title="Tests">⚠️</a></td>
89
+ <td align="center"><a href="https://github.com/kyranet"><img src="https://avatars0.githubusercontent.com/u/24852502?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Antonio Román</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=kyranet" title="Code">💻</a> <a href="#projectManagement-kyranet" title="Project Management">📆</a> <a href="https://github.com/sapphiredev/utilities/pulls?q=is%3Apr+reviewed-by%3Akyranet" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/sapphiredev/utilities/commits?author=kyranet" title="Tests">⚠️</a></td>
90
+ <td align="center"><a href="https://github.com/PyroTechniac"><img src="https://avatars2.githubusercontent.com/u/39341355?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gryffon Bellish</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=PyroTechniac" title="Code">💻</a> <a href="https://github.com/sapphiredev/utilities/pulls?q=is%3Apr+reviewed-by%3APyroTechniac" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/sapphiredev/utilities/commits?author=PyroTechniac" title="Tests">⚠️</a></td>
91
+ <td align="center"><a href="https://github.com/vladfrangu"><img src="https://avatars3.githubusercontent.com/u/17960496?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vlad Frangu</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=vladfrangu" title="Code">💻</a> <a href="https://github.com/sapphiredev/utilities/issues?q=author%3Avladfrangu" title="Bug reports">🐛</a> <a href="https://github.com/sapphiredev/utilities/pulls?q=is%3Apr+reviewed-by%3Avladfrangu" title="Reviewed Pull Requests">👀</a> <a href="#userTesting-vladfrangu" title="User Testing">📓</a> <a href="https://github.com/sapphiredev/utilities/commits?author=vladfrangu" title="Tests">⚠️</a></td>
92
+ <td align="center"><a href="https://github.com/Stitch07"><img src="https://avatars0.githubusercontent.com/u/29275227?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stitch07</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Stitch07" title="Code">💻</a> <a href="#projectManagement-Stitch07" title="Project Management">📆</a> <a href="https://github.com/sapphiredev/utilities/commits?author=Stitch07" title="Tests">⚠️</a></td>
93
+ <td align="center"><a href="https://github.com/apps/depfu"><img src="https://avatars3.githubusercontent.com/in/715?v=4?s=100" width="100px;" alt=""/><br /><sub><b>depfu[bot]</b></sub></a><br /><a href="#maintenance-depfu[bot]" title="Maintenance">🚧</a></td>
94
+ <td align="center"><a href="https://github.com/apps/allcontributors"><img src="https://avatars0.githubusercontent.com/in/23186?v=4?s=100" width="100px;" alt=""/><br /><sub><b>allcontributors[bot]</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=allcontributors[bot]" title="Documentation">📖</a></td>
95
+ </tr>
96
+ <tr>
97
+ <td align="center"><a href="https://github.com/Nytelife26"><img src="https://avatars1.githubusercontent.com/u/22531310?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tyler J Russell</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Nytelife26" title="Documentation">📖</a></td>
98
+ <td align="center"><a href="https://github.com/Alcremie"><img src="https://avatars0.githubusercontent.com/u/54785334?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ivan Lieder</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Alcremie" title="Code">💻</a> <a href="https://github.com/sapphiredev/utilities/issues?q=author%3AAlcremie" title="Bug reports">🐛</a></td>
99
+ <td align="center"><a href="https://github.com/RealShadowNova"><img src="https://avatars3.githubusercontent.com/u/46537907?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Hezekiah Hendry</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=RealShadowNova" title="Code">💻</a></td>
100
+ <td align="center"><a href="https://github.com/Vetlix"><img src="https://avatars.githubusercontent.com/u/31412314?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vetlix</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Vetlix" title="Code">💻</a></td>
101
+ <td align="center"><a href="https://github.com/ethamitc"><img src="https://avatars.githubusercontent.com/u/27776796?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ethan Mitchell</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=ethamitc" title="Documentation">📖</a></td>
102
+ <td align="center"><a href="https://github.com/noftaly"><img src="https://avatars.githubusercontent.com/u/34779161?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Elliot</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=noftaly" title="Code">💻</a></td>
103
+ <td align="center"><a href="https://jurien.dev"><img src="https://avatars.githubusercontent.com/u/5418114?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jurien Hamaker</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=jurienhamaker" title="Code">💻</a></td>
104
+ </tr>
105
+ <tr>
106
+ <td align="center"><a href="https://fanoulis.dev/"><img src="https://avatars.githubusercontent.com/u/38255093?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Charalampos Fanoulis</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=cfanoulis" title="Documentation">📖</a></td>
107
+ <td align="center"><a href="https://github.com/apps/dependabot"><img src="https://avatars.githubusercontent.com/in/29110?v=4?s=100" width="100px;" alt=""/><br /><sub><b>dependabot[bot]</b></sub></a><br /><a href="#maintenance-dependabot[bot]" title="Maintenance">🚧</a></td>
108
+ <td align="center"><a href="https://kaname.netlify.app/"><img src="https://avatars.githubusercontent.com/u/56084970?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kaname</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=kaname-png" title="Code">💻</a></td>
109
+ <td align="center"><a href="https://github.com/nandhagk"><img src="https://avatars.githubusercontent.com/u/62976649?v=4?s=100" width="100px;" alt=""/><br /><sub><b>nandhagk</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/issues?q=author%3Anandhagk" title="Bug reports">🐛</a></td>
110
+ <td align="center"><a href="https://megatank58.me/"><img src="https://avatars.githubusercontent.com/u/51410502?v=4?s=100" width="100px;" alt=""/><br /><sub><b>megatank58</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=megatank58" title="Code">💻</a></td>
111
+ <td align="center"><a href="https://github.com/UndiedGamer"><img src="https://avatars.githubusercontent.com/u/84702365?v=4?s=100" width="100px;" alt=""/><br /><sub><b>UndiedGamer</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=UndiedGamer" title="Code">💻</a></td>
112
+ <td align="center"><a href="https://github.com/Lioness100"><img src="https://avatars.githubusercontent.com/u/65814829?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Lioness100</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Lioness100" title="Documentation">📖</a> <a href="https://github.com/sapphiredev/utilities/commits?author=Lioness100" title="Code">💻</a></td>
113
+ </tr>
114
+ <tr>
115
+ <td align="center"><a href="https://gitlab.com/DavidPH/"><img src="https://avatars.githubusercontent.com/u/44669930?v=4?s=100" width="100px;" alt=""/><br /><sub><b>David</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=DavidPHH" title="Code">💻</a></td>
116
+ <td align="center"><a href="https://github.com/apps/renovate"><img src="https://avatars.githubusercontent.com/in/2740?v=4?s=100" width="100px;" alt=""/><br /><sub><b>renovate[bot]</b></sub></a><br /><a href="#maintenance-renovate[bot]" title="Maintenance">🚧</a></td>
117
+ <td align="center"><a href="https://renovate.whitesourcesoftware.com/"><img src="https://avatars.githubusercontent.com/u/25180681?v=4?s=100" width="100px;" alt=""/><br /><sub><b>WhiteSource Renovate</b></sub></a><br /><a href="#maintenance-renovate-bot" title="Maintenance">🚧</a></td>
118
+ </tr>
119
+ </table>
120
+
121
+ <!-- markdownlint-restore -->
122
+ <!-- prettier-ignore-end -->
123
+
124
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
125
+
126
+ This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
@@ -0,0 +1,3 @@
1
+ export * from './lib/Phisherman';
2
+ export type { CheckReturnType, PhishermanOptions, PhishermanReportType, PhishermanReturnType } from './lib/PhishermanTypes';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ (0, tslib_1.__exportStar)(require("./lib/Phisherman"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,gEAAiC"}
package/dist/index.mjs ADDED
@@ -0,0 +1,6 @@
1
+ import mod from "./index.js";
2
+
3
+ export default mod;
4
+ export const checkDomain = mod.checkDomain;
5
+ export const reportDomain = mod.reportDomain;
6
+ export const setApiKey = mod.setApiKey;
@@ -0,0 +1,26 @@
1
+ import type { PhishermanReportType } from './PhishermanTypes';
2
+ /**
3
+ * Checks if a link is detected as a scam or phishing link by phisherman.
4
+ * @param domain The domain to check.
5
+ * @param apiKey optionally pass a Phiserman API key for making this request. This will default to {@link storedApiKey}, which can be configured through {@link setApiKey}.
6
+ * @since 1.0.0
7
+ */
8
+ export declare function checkDomain(domain: string, apiKey?: string): Promise<{
9
+ isScam: boolean;
10
+ verifiedPhish: boolean;
11
+ classification: "malicious" | "suspicious" | "safe" | "unknown";
12
+ }>;
13
+ /**
14
+ * Report a domain that is confirmed to be a scam or phishing domain to phisherman, to enhance their API.
15
+ * @param domain The domain to report.
16
+ * @param apiKey optionally pass a Phiserman API key for making this request. This will default to {@link storedApiKey}, which can be configured through {@link setApiKey}.
17
+ * @since 1.0.0
18
+ */
19
+ export declare function reportDomain(domain: string, apiKey?: string): Promise<PhishermanReportType>;
20
+ /**
21
+ * Set the phisherman's API key.
22
+ * @param key The API key to access the phisherman API and cache within the code of the wrapper.
23
+ * @since 1.0.0
24
+ */
25
+ export declare function setApiKey(key: string): Promise<void>;
26
+ //# sourceMappingURL=Phisherman.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Phisherman.d.ts","sourceRoot":"","sources":["../../src/lib/Phisherman.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAwB,MAAM,mBAAmB,CAAC;AAKpF;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,MAAqB;;;;GAiB9E;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,MAAqB,iCAgBzE;AAED;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,iBAG1C"}
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setApiKey = exports.reportDomain = exports.checkDomain = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const fetch_1 = require("@sapphire/fetch");
6
+ const node_os_1 = (0, tslib_1.__importDefault)(require("node:os"));
7
+ let storedApiKey;
8
+ /**
9
+ * Checks if a link is detected as a scam or phishing link by phisherman.
10
+ * @param domain The domain to check.
11
+ * @param apiKey optionally pass a Phiserman API key for making this request. This will default to {@link storedApiKey}, which can be configured through {@link setApiKey}.
12
+ * @since 1.0.0
13
+ */
14
+ async function checkDomain(domain, apiKey = storedApiKey) {
15
+ const result = await (0, fetch_1.fetch)(`https://api.phisherman.gg/v2/domains/check/${domain}`, {
16
+ headers: {
17
+ 'Content-Type': 'application/json',
18
+ 'User-Agent': `Sapphire Phisherman/1.0.0 (node-fetch) ${node_os_1.default.platform()}/${node_os_1.default.release()} (https://github.com/sapphiredev/utilities/tree/main/packages/phisherman)`,
19
+ Authorization: `Bearer ${apiKey}`
20
+ }
21
+ }, "json" /* JSON */);
22
+ return {
23
+ ...result,
24
+ isScam: result.classification === 'safe' || result.classification === 'unknown' ? false : true
25
+ };
26
+ }
27
+ exports.checkDomain = checkDomain;
28
+ /**
29
+ * Report a domain that is confirmed to be a scam or phishing domain to phisherman, to enhance their API.
30
+ * @param domain The domain to report.
31
+ * @param apiKey optionally pass a Phiserman API key for making this request. This will default to {@link storedApiKey}, which can be configured through {@link setApiKey}.
32
+ * @since 1.0.0
33
+ */
34
+ function reportDomain(domain, apiKey = storedApiKey) {
35
+ return (0, fetch_1.fetch)(`https://api.phisherman.gg/v2/phish/report`, {
36
+ method: "PUT" /* Put */,
37
+ headers: {
38
+ 'Content-Type': 'application/json',
39
+ 'User-Agent': `Sapphire Phisherman/1.0.0 (node-fetch) ${node_os_1.default.platform()}/${node_os_1.default.release()} (https://github.com/sapphiredev/utilities/tree/main/packages/phisherman)`,
40
+ Authorization: `Bearer ${apiKey}`
41
+ },
42
+ body: JSON.stringify({
43
+ url: domain
44
+ })
45
+ }, "json" /* JSON */);
46
+ }
47
+ exports.reportDomain = reportDomain;
48
+ /**
49
+ * Set the phisherman's API key.
50
+ * @param key The API key to access the phisherman API and cache within the code of the wrapper.
51
+ * @since 1.0.0
52
+ */
53
+ async function setApiKey(key) {
54
+ await checkApiKey(key);
55
+ storedApiKey = key;
56
+ }
57
+ exports.setApiKey = setApiKey;
58
+ async function checkApiKey(apiKey) {
59
+ try {
60
+ await (0, fetch_1.fetch)(`https://api.phisherman.gg/v2/domains/check/verified.test.phisherman.gg`, {
61
+ headers: {
62
+ 'Content-Type': 'application/json',
63
+ 'User-Agent': `Sapphire Phisherman/1.0.0 (node-fetch) ${node_os_1.default.platform()}/${node_os_1.default.release()} (https://github.com/sapphiredev/utilities/tree/main/packages/phisherman)`,
64
+ Authorization: `Bearer ${apiKey}`
65
+ }
66
+ }, "json" /* JSON */);
67
+ }
68
+ catch (error) {
69
+ const typedError = error;
70
+ if (typedError.code === 401 && typedError.toJSON().message === 'missing permissions or invalid API key') {
71
+ throw new Error('[SapphirePhisherman]: Invalid API key provided');
72
+ }
73
+ throw error;
74
+ }
75
+ }
76
+ //# sourceMappingURL=Phisherman.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Phisherman.js","sourceRoot":"","sources":["../../src/lib/Phisherman.ts"],"names":[],"mappings":";;;;AAAA,2CAAoF;AAEpF,mEAAyB;AAEzB,IAAI,YAAoB,CAAC;AAEzB;;;;;GAKG;AACI,KAAK,UAAU,WAAW,CAAC,MAAc,EAAE,SAAiB,YAAY;IAC9E,MAAM,MAAM,GAAG,MAAM,IAAA,aAAK,EACzB,8CAA8C,MAAM,EAAE,EACtD;QACC,OAAO,EAAE;YACR,cAAc,EAAE,kBAAkB;YAClC,YAAY,EAAE,0CAA0C,iBAAE,CAAC,QAAQ,EAAE,IAAI,iBAAE,CAAC,OAAO,EAAE,2EAA2E;YAChK,aAAa,EAAE,UAAU,MAAM,EAAE;SACjC;KACD,oBAED,CAAC;IAEF,OAAO;QACN,GAAG,MAAM;QACT,MAAM,EAAE,MAAM,CAAC,cAAc,KAAK,MAAM,IAAI,MAAM,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;KAC9F,CAAC;AACH,CAAC;AAjBD,kCAiBC;AAED;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,MAAc,EAAE,SAAiB,YAAY;IACzE,OAAO,IAAA,aAAK,EACX,2CAA2C,EAC3C;QACC,MAAM,iBAAkB;QACxB,OAAO,EAAE;YACR,cAAc,EAAE,kBAAkB;YAClC,YAAY,EAAE,0CAA0C,iBAAE,CAAC,QAAQ,EAAE,IAAI,iBAAE,CAAC,OAAO,EAAE,2EAA2E;YAChK,aAAa,EAAE,UAAU,MAAM,EAAE;SACjC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;YACpB,GAAG,EAAE,MAAM;SACX,CAAC;KACF,oBAED,CAAC;AACH,CAAC;AAhBD,oCAgBC;AAED;;;;GAIG;AACI,KAAK,UAAU,SAAS,CAAC,GAAW;IAC1C,MAAM,WAAW,CAAC,GAAG,CAAC,CAAC;IACvB,YAAY,GAAG,GAAG,CAAC;AACpB,CAAC;AAHD,8BAGC;AAED,KAAK,UAAU,WAAW,CAAC,MAAc;IACxC,IAAI;QACH,MAAM,IAAA,aAAK,EACV,wEAAwE,EACxE;YACC,OAAO,EAAE;gBACR,cAAc,EAAE,kBAAkB;gBAClC,YAAY,EAAE,0CAA0C,iBAAE,CAAC,QAAQ,EAAE,IAAI,iBAAE,CAAC,OAAO,EAAE,2EAA2E;gBAChK,aAAa,EAAE,UAAU,MAAM,EAAE;aACjC;SACD,oBAED,CAAC;KACF;IAAC,OAAO,KAAK,EAAE;QACf,MAAM,UAAU,GAAG,KAAmB,CAAC;QAEvC,IAAI,UAAU,CAAC,IAAI,KAAK,GAAG,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC,OAAO,KAAK,wCAAwC,EAAE;YACxG,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;SAClE;QAED,MAAM,KAAK,CAAC;KACZ;AACF,CAAC"}
@@ -0,0 +1,15 @@
1
+ export interface PhishermanOptions {
2
+ apiKey: string;
3
+ }
4
+ export interface PhishermanReturnType {
5
+ verifiedPhish: boolean;
6
+ classification: 'malicious' | 'suspicious' | 'safe' | 'unknown';
7
+ }
8
+ export declare type CheckReturnType = PhishermanReturnType & {
9
+ isScam: boolean;
10
+ };
11
+ export interface PhishermanReportType {
12
+ success: boolean;
13
+ message: string;
14
+ }
15
+ //# sourceMappingURL=PhishermanTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PhishermanTypes.d.ts","sourceRoot":"","sources":["../../src/lib/PhishermanTypes.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IACjC,MAAM,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACpC,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,WAAW,GAAG,YAAY,GAAG,MAAM,GAAG,SAAS,CAAC;CAChE;AAED,oBAAY,eAAe,GAAG,oBAAoB,GAAG;IACpD,MAAM,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=PhishermanTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PhishermanTypes.js","sourceRoot":"","sources":["../../src/lib/PhishermanTypes.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@sapphire/phisherman",
3
+ "version": "0.1.0-next.68fba03.0",
4
+ "description": "Wrapper around phisherman to easily check and report domains",
5
+ "author": "@sapphire",
6
+ "license": "MIT",
7
+ "main": "dist/index.js",
8
+ "module": "dist/index.mjs",
9
+ "types": "dist/index.d.ts",
10
+ "typedocMain": "src/index.ts",
11
+ "exports": {
12
+ "import": "./dist/index.mjs",
13
+ "require": "./dist/index.js"
14
+ },
15
+ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/phisherman",
16
+ "scripts": {
17
+ "lint": "eslint src --ext ts --fix",
18
+ "build": "tsc -b src && yarn esm:default",
19
+ "esm:default": "gen-esm-wrapper dist/index.js dist/index.mjs",
20
+ "prepublishOnly": "yarn build"
21
+ },
22
+ "dependencies": {
23
+ "@sapphire/fetch": "^2.0.3"
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/sapphiredev/utilities.git",
28
+ "directory": "packages/phisherman"
29
+ },
30
+ "files": [
31
+ "dist",
32
+ "!dist/*.tsbuildinfo"
33
+ ],
34
+ "engines": {
35
+ "node": ">=16.6.0",
36
+ "npm": ">=7.0.0"
37
+ },
38
+ "keywords": [
39
+ "sapphiredev",
40
+ "bot",
41
+ "typescript",
42
+ "ts",
43
+ "yarn",
44
+ "discord",
45
+ "sapphire",
46
+ "phisherman",
47
+ "scam",
48
+ "detection"
49
+ ],
50
+ "bugs": {
51
+ "url": "https://github.com/sapphiredev/utilities/issues"
52
+ },
53
+ "publishConfig": {
54
+ "access": "public"
55
+ },
56
+ "gitHead": "68fba03bcbd3af14e66b25357d1eafd0cc315f0f"
57
+ }