示例#1
0
 def execute(self, tokens):
     if len(tokens) > 0:
         command, params = tokens[0], tokens[1:]
         #print "command: " + command + "; " + str(self.get_commands())
         if command in self.get_commands():
             return menu.execute(self, tokens)
         else:
             self._enablePlugins(','.join(tokens).split(','))
     else:
         return self
示例#2
0
文件: plugins.py 项目: weisst/w3af
 def execute(self, tokens):
     if len(tokens) > 0:
         command, params = tokens[0], tokens[1:]
         #print "command: " + command + "; " + str(self.get_commands())
         if command in self.get_commands():
             return menu.execute(self, tokens)
         else:
             self._enablePlugins(','.join(tokens).split(','))
     else:
         return self
示例#3
0
 def execute(self, tokens):
     '''
     This is a trick to make this console back-compatible.
     For example, command 'audit' means 'show all audit plugins',
     while command 'audit xss' means 'enable xss plugin'.
     At the same time, to show only enabled audit plugin, the command
     'list audit enabled' has to be used.
     That's an inconsistency, which needs a resolution.
     '''
     if len(tokens) == 1 and tokens[0] in self._children:
         return self._cmd_list(tokens)
     return menu.execute(self, tokens)
示例#4
0
文件: plugins.py 项目: weisst/w3af
 def execute(self, tokens):
     '''
     This is a trick to make this console back-compatible.
     For example, command 'audit' means 'show all audit plugins',
     while command 'audit xss' means 'enable xss plugin'.
     At the same time, to show only enabled audit plugin, the command
     'list audit enabled' has to be used.
     That's an inconsistency, which needs a resolution.
     '''
     if len(tokens) == 1 and tokens[0] in self._children:
         return self._cmd_list(tokens)
     return menu.execute(self, tokens)