to create your own module all you'v to do is create a init file inside folder with the name of module
# CURRENT PATH: scant3r/scant3r/modules
$ mkdir sqli_error
$ touch sqli_error/__init__.py
then open the init file and write your own functions inside Main class but don't forget to add Scan as a subclass to it, why?
because Scan provides a lot of easier things to do something like send http request or create OAST host, etc ..
after that you'll need to add the user options that your module need in the init function parameters
like the URL of the target, HTTP headers ,HTTP method
from typing import Dict, Listfrom scant3r.core.requester import httpSenderfrom scant3r.modules.scan import ScanclassMain(Scan):def__init__(self,http: httpSender,methods: List[str],url:str,convert_body:bool=False,**_, ): self.opts ={"url": url,"methods": methods,}# scanner tag = scan for every url# recon tag = scan only once for the root domain# convert_body = allow the http request to auto change the request body based on the method / content-type super().__init__(http, "scanner", convert_body)defstart(self):pass
now you've the point of the start all need to do is writing you're own scanning logic
for example in this artical we'll write a SQLI errors finder so first we need to add the matching data that our scanner will use
for non-executable files add them in scant3r -> db
for global data you can add it in scant3r -> code -> data.py file
I'm gonna to add matching patterns inside sqli_db.json file