stop-discord-phishing
Version:
A simple Package that gives you Utils to find and recognize Discord Phishing Links to prevent scams & phishing
157 lines (113 loc) • 4.5 kB
Markdown




[](https://github.com/nikolaischunk/stop-discord-phishing) works with the [list of phishing Domains](https://github.com/nikolaischunk/discord-phishing-links) to detect [phishing](https://en.wikipedia.org/wiki/Phishing) domains in messages on [Discord](https://discord.com).
This is the official repository & NPM package which provides functionality in detecting phising links.
If you like this project consider giving it a ⭐ and feel free to contribute to this project!
If you found a domain that is not detected yet, contribute it to the [discord-phishing-links](https://github.com/nikolaischunk/discord-phishing-links) repository!
```bash
npm install stop-discord-phishing
yarn add stop-discord-phishing
```
```javascript
const stopPhishing = require("stop-discord-phishing");
```
```javascript
const message = "this is definitivelynotascamdomain.ru that should be checked";
//Check string on confirmed Phishing Domains
async function checkMessage(message) {
const isGrabber = await stopPhishing.checkMessage(message); //True
console.log(isGrabber);
return isGrabber;
}
//Check string on confirmed Phishing Domains & suspicious Domains RECOMMENDED!
async function checkMessageFull(message) {
const isGrabber = await stopPhishing.checkMessage(message, true); //True
console.log(isGrabber);
return isGrabber;
}
checkMessage(message);
checkMessageFull(message);
```
```javascript
async function listPhishingDomains() {
const links = await stopPhishing.listPhishingDomains(); //[]
//Now you can do something with Array with all the confirmed Phishing Domains in it
console.log(links);
return links;
}
async function listSuspiciousDomains() {
const links = await stopPhishing.listSuspiciousDomains(); //[]
//Now you can do something with Array with all the suspicious Domains in it
console.log(links);
return links;
}
async function listAllDomains() {
const links = await stopPhishing.listAllDomains(); //[]
//Now you can do something with Array with all the suspicious and confirmed phishing Domains in it
console.log(links);
return links;
}
listPhishingDomains();
listSuspiciousDomains();
listAllDomains();
```
```javascript
//Get the amount of all Phishing and Suspicious Domains
async function getDomainAmount() {
const amount = await stopPhishing.domainCount(); //Number
console.log(amount);
return amount;
}
//Get the amount of all Phishing Domains
async function getPhishingDomainAmount() {
const amount = await stopPhishing.phishingDomainCount(); //Number
console.log(amount);
return amount;
}
//Get the amount of all Suspicious Domains
async function getSuspiciousDomainAmount() {
const amount = await stopPhishing.suspiciousDomainCount(); //Number
console.log(amount);
return amount;
}
getDomainAmount();
getPhishingDomainAmount();
getSuspiciousDomainAmount();
```
To prevent an excess of requests and load, we added a Cache of `30 minutes`!
Find the complete List of Phishing Domains here: [discord-phishing-links](https://github.com/nikolaischunk/discord-phishing-links)
- Updated README.md
- Renamed `listDomains()` to `listPhishingDomains()`
- Added DomainCount Support
- Updated ReadMe to reflect the new DomainCount Support
- Added toString to also support non-string values
- Updated ReadMe with latest changes
- Added better regex to detect exact domain matches
- Updated ReadMe
- Added suspicious Domains Support
- Updated ReadMe
- Added Chache Support and set Cache duration to 30min
- Added better Project Structure
- Initial (and Test) Upload