Skip to content

Create a new module

AlessandroZ edited this page Jul 27, 2018 · 3 revisions

It's possible to write your own script for the software of your choice. Building your own module has become extremely easy.

To do that, some code standards are to be met:

  • Create a class using the name of the software containing 2 importants functions:
    • init: used to define all arguments used to launch the class.

      • options dictionary is mandatory
      • suboptions dictionary is optional
      • Call ModuleInfo as following ModuleInfo.__init__(self, <class_module>,<category>,options,suboptions)
    • run:

      • Function creation: def run(self, software_name = None):
      • It has to return an array of dictionaries
        • [{"Username": "emiliano", "Password":"ZapaTa", "URL": "http://mail.com"}]
    • Optional: you could use the function "print_debug" to print your output. It will be printed when the "-v" option is used.

Here is an example of the structure of a basic class:

  • Add on the config.manageModules.py file your class name and your import

Run lazagne, your new module should be launched.

If you want to improve this tool, you can send me your script and it will be added to this project (authors will be, of course, credited on each script ;)).

Clone this wiki locally