DMD is a program that reads the content of a given file and looks for common things that are found in token stealers.
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
)
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
)