Giter Club home page Giter Club logo

stop-discord-phishing's Introduction

Stop Discord Phishing

domains npm npm npm

About this Package

stop-discord-phishing works with the list of phishing Domains to detect phishing domains in messages on Discord.

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!

Source

If you found a domain that is not detected yet, contribute it to the discord-phishing-links repository!

Add Package to your Project

npm install stop-discord-phishing
# or
yarn add stop-discord-phishing

How to use:

const stopPhishing = require("stop-discord-phishing");

Check if String contains a Phishing Link:

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);

List all Domains:

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();

Get Domain Count:

//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();

Cache

To prevent an excess of requests and load, we added a Cache of 30 minutes!

List of Phishing Domains

Find the complete List of Phishing Domains here: discord-phishing-links

Changelog

0.3.1

  • Updated README.md

0.3.0 Current

  • Renamed listDomains() to listPhishingDomains()
  • Added DomainCount Support
  • Updated ReadMe to reflect the new DomainCount Support

0.2.1

  • Added toString to also support non-string values
  • Updated ReadMe with latest changes

0.2.0

  • Added better regex to detect exact domain matches
  • Updated ReadMe

0.1.0

  • Added suspicious Domains Support
  • Updated ReadMe

0.0.4

  • Added Chache Support and set Cache duration to 30min

0.0.3

  • Added better Project Structure

0.0.1

  • Initial (and Test) Upload

stop-discord-phishing's People

Contributors

adri326 avatar aidanthejsdev avatar ebmofficial avatar lucapolesel avatar nikolaischunk avatar notghex avatar voidreck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

stop-discord-phishing's Issues

message.toLowerCase() is not a function.

Hello,

I'm currently integrating this package into my Discord bot and have encountered an error.
image
This issue occurs on any message I send. Let it be a scam link, normal link or even just a simple message.
This is my code:
client.on('messageCreate', async message => { const guildID = await APSchema.findOne({ guildid: message.guild.id }) if (guildID) { if (message.guild.id === guildID.guildid) { async function checkMessage (message) { //check string on confirmed Phishing Domains let isGrabber = await stopPhishing.checkMessage(message) //Now you can do something with the Boolean Value console.log(isGrabber) return isGrabber } async function checkMessageFull (message) { //check string on confirmed & not yet confirmed but suspicious Phishing Domains let isGrabber = await stopPhishing.checkMessage(message) //Now you can do something with the Boolean Value console.log(isGrabber) return isGrabber } checkMessage(message) checkMessageFull(message) } } else return; })
I'm seeing that the line "let isGrabber = await stopPhishing.checkMessage(message)" is where this issue is occurring. Is there a way to solve this issue?

I'm running Discord.JS v13.6.

Return false

Hello I tried your project and when I send message in discord like shown :"this is definitivelynotascamdomain.ru that should be checked" it return false.
image
image

Causes false positives.

The list includes domains that are contained within other, legitimate domains. For example, any cdn.discordapp.com URL gets flagged, since discordapp.co is on the list.
I suggest finding the exact domain for every URL in the message, and then checking whether or not or not any of those domains are in on the list, rather than simply checking if the message includes any of the listed domains.

discord.gift gets detected

Somehow discord.gift gets detected. the closest matching domains are ldiscord.gift, discord.gifte and discord.gifte.com.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.