Open scmanjarrez opened 3 years ago
This looks like an easy win at first glance. Adding the action descriptions should be possible by pulling them from the m
instance of the module
object
We'd have to double check the indexes aren't used for anything else though. I take it you haven't found any uses for them in pymetasploit3
@scmanjarrez?
If you're referring to pymetasploit3, then no. It take into account only the value, e.g: DUMP, SCAN, etc. Index isn't used at all.
@action.setter
def action(self, action):
if action not in self.actions.values():
raise ValueError('Action must be one of %s' % repr(list(self.actions.values())))
self._action = action
self._runopts['ACTION'] = self._action
Summary
Include the action description on module.info calls.
Basic example
Current behaviour:
Proposed behaviour:
P.S.: Action description can be obtained from msfconsole.
Motivation
Index doesn't have any meaningful information, you don't use it either. You set the option with the action value, e.g. DUMP, SCAN... Other module options have a desc attribute, describing the option, e.g. RPORT