Coder Social home page Coder Social logo

discord-malware-detector's Introduction

Discord Malware Detector ๐Ÿš™

make discord skidz angry

DMD is a program that reads the content of a given file and looks for common things that are found in token stealers.

Features

  • decodes base64 strings
  • looks for malicious regexps
  • looks for suspicious words
  • looks for webhooks URL
  • looks for pastebin.com links

Create your own grabber

Grabbers are stored in /grabbers/. To create your own, just create a file (ex: my_grabber.py). Then just copy this template:

import re
from typing import List, Tuple

from core.abc import Grabber

class My_Grabber(Grabber):
    def __init__(self, content: str) -> None:
        super().__init__(content)

    def analyse(self) -> Tuple[str, bool]:
        self.regex = re.compile(
            r'()', # your regular expression here, do not forget the ( ) 
            re.IGNORECASE
        )

        return (
            'Grabber name', 
            self._analyse(self.regex) # self._alalys() is a bool value, so you can use other ways (checksums, 'string' if self.content etc.)
        )

for sure in main.py you need to import your matcher with from grabbers.my_grabber import MyGrabber then add it to the matchers list:

grabbers = (
    ...,
    MyGrabber
)

Create your own matcher

Matchers are stored in /matchers/. To create your own, just create a file (ex: my_matcher.py). Then just copy this template:

import re
from typing import List, Tuple

from core.abc import Matcher

class MyMatcher(Matcher):
    def __init__(self, content: str) -> None:
        super().__init__(content)

    def find(self) -> List[Tuple[int, str, str]]:
        self.regex = re.compile(
            r'()', # your regular expression here, do not forget the ( ) 
            re.IGNORECASE
        )
        
        return self._find(
            regex=self.regex,
            type='' # result type (ex: discord webhook?, suspect word? etc, can be whatever you want)
        )

for sure in main.py you need to import your matcher with from modules.my_module import MyMatcher then add it to the matchers list:

matchers = (
    ...,
    MyMatcher
)

s/o to...

  • Vichy for the idea
  • sql for the new webhook regex.

discord-malware-detector's People

Contributors

t0ast1337 avatar traumatism avatar illuminatifish avatar dropsql avatar trumpedev avatar

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.