@@ -2009,7 +2009,7 @@ def cmd_set_tabs(str, words)
2009
2009
res << 'ENCODER'
2010
2010
end
2011
2011
2012
- if ( mod . auxiliary? or mod . post? )
2012
+ if mod . kind_of? ( Msf :: Module :: HasActions )
2013
2013
res << "ACTION"
2014
2014
end
2015
2015
@@ -2149,7 +2149,7 @@ def cmd_show(*args)
2149
2149
print_error ( "No exploit module selected." )
2150
2150
end
2151
2151
when "actions"
2152
- if ( mod and ( mod . auxiliary? or mod . post? ) )
2152
+ if mod && mod . kind_of? ( Msf :: Module :: HasActions )
2153
2153
show_actions ( mod )
2154
2154
else
2155
2155
print_error ( "No auxiliary or post module selected." )
@@ -2721,8 +2721,8 @@ def tab_complete_option(str, words)
2721
2721
return option_values_encoders ( ) if opt . upcase == 'StageEncoder'
2722
2722
end
2723
2723
2724
- # Well-known option names specific to auxiliaries and posts
2725
- if ( mod . auxiliary? or mod . post? )
2724
+ # Well-known option names specific to modules with actions
2725
+ if mod . kind_of? ( Msf :: Module :: HasActions )
2726
2726
return option_values_actions ( ) if opt . upcase == 'ACTION'
2727
2727
end
2728
2728
@@ -3147,7 +3147,7 @@ def show_options(mod) # :nodoc:
3147
3147
end
3148
3148
3149
3149
# Print the selected action
3150
- if mod . kind_of? ( Msf ::Module ::HasActions )
3150
+ if mod . kind_of? ( Msf ::Module ::HasActions ) && mod . action
3151
3151
mod_action = Serializer ::ReadableText . dump_module_action ( mod , ' ' )
3152
3152
print ( "\n #{ mod . type . capitalize } action:\n \n #{ mod_action } \n " ) if ( mod_action and mod_action . length > 0 )
3153
3153
end
0 commit comments