'This is the method that is called when a user wants to execute
something in the shell.
First, I trap the requests for starting the virtual daemon and
the w3afAgent, and if this is not the case, I forward the request
to the specific_user_input method which should be implemented by
all shellAttackPlugins.'

def generic_user_input(self, command, params):

    if (command.strip() == 'help'):
        help_command = None
        if (len(params) >= 1):
            help_command = params[0]
        return self.help(help_command)
    elif (command == 'payload'):
        if params:
            return self._payload(params)
    elif (command == 'lsp'):
        return self._print_runnable_payloads()
    elif hasattr(self, 'specific_user_input'):
        response = self.specific_user_input(command, params)
        if (response is None):
            return ('Command    "%s"    not    found.    Please    type    "help".' % command)
        else:
            return response
