-
Notifications
You must be signed in to change notification settings - Fork 72
ExtendingHandlerModules
Ioannis Stais edited this page May 14, 2017
·
2 revisions
The utilities modules of lightbulb, are the implementations of the membership requests (The part of the algorithm that will answer "TRUE" or "FALSE" about a potential attack payload.
In order to extend the util modules, you have to place a file with the request format in folder located at "lightbulb/core/utils/"
META = {
'author': 'Your name goes here',
'name': 'NAME OF THE UTIL CLASS AS DEFINED LATER',
'description': 'Short description',
'type': 'UTIL',
'options': [
('OPTION NAME IN CAPITALS', "default value", Boolean value indicating if it is required, 'Short Description for the option'),
],
'comments': ['Comments go here']
}
class NAME_OF_THE_UTIL_CLASS():
def setup(self, configuration):
"""
Sets the variables instances
Args:
configuration (dict): A user provided dictionary
with values defined through lightbulb CLI
Returns:
None
"""
self.sample_option_name = configuration['OPTION NAME IN CAPITALS']
def query(self, input_string):
"""
Perform a query
Args:
input_string (str): The input string to be tested
Returns:
bool: A success or failure response
"""