Skip to content

Commit b2ba6e7

Browse files
committed
Make the code more maintainable
Despite the code around it. Thanks for the advice, @jlee-r7!
1 parent c0ef2c7 commit b2ba6e7

File tree

1 file changed

+2
-2
lines changed
  • lib/msf/ui/console/command_dispatcher

1 file changed

+2
-2
lines changed

lib/msf/ui/console/command_dispatcher/core.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3144,9 +3144,9 @@ def show_options(mod) # :nodoc:
31443144
if (mod.exploit? and mod.target)
31453145
mod_targ = Serializer::ReadableText.dump_exploit_target(mod, ' ')
31463146
print("\nExploit target:\n\n#{mod_targ}\n") if (mod_targ and mod_targ.length > 0)
3147-
elsif ((mod.auxiliary? or mod.post?) and mod.action)
3147+
elsif mod.kind_of?(Msf::Module::HasActions)
31483148
mod_action = Serializer::ReadableText.dump_auxiliary_action(mod, ' ')
3149-
print("\n#{mod.auxiliary? ? 'Auxiliary' : 'Post'} action:\n\n#{mod_action}\n") if (mod_action and mod_action.length > 0)
3149+
print("\n#{mod.type.capitalize} action:\n\n#{mod_action}\n") if (mod_action and mod_action.length > 0)
31503150
end
31513151

31523152
# Uncomment this line if u want target like msf2 format

0 commit comments

Comments
 (0)