-
-
Notifications
You must be signed in to change notification settings - Fork 827
Module Development
In order to increase the capabilities of the commix tool and/or to adapt it to our needs, we can easily develop and import our own modules!
Lets suppose we want to add a new module, which is a python script named as new_module.py
and that it prints out the awesome message: "Hello world,from the new module!".
For our example the module contains only one main()
function, which prints the message "Hello world,from the new module!".
def main():
print "Hello world from the new module!"
# More cool stuffz here!
(...code...)
The desired module has to be placed in the modules directory /src/core/modules/
.
Then, after we have created the module we desired, we import the module on module_handler.py
by entering the following :
try:
(...code...)
from src.core.modules import new_module # <-- Add your module here!!
(...code...)
except ImportError as e:
(...code...)
After the aforementioned steps, the module name new_module
and the function which will be called first (in our case the main()
function) should be defined inside the load_modules()
function of the module_handler.py
script.
def load_modules(url,http_request_method):
new_module.main() # <-- Load your module here!!
(...code...)
At the right side panel, you can find detailed information about Commix Project.