Skip to content

Commit 312c7f0

Browse files
committed
Use full path to check module class instead
1 parent c5edd55 commit 312c7f0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

msfcli

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,6 @@ class Msfcli
464464
# Selects a mode chosen by the user and run it
465465
#
466466
def engage_mode(modules)
467-
ref_name = modules[:module].refname
468-
469467
case @args[:mode].downcase
470468
when 'h'
471469
usage
@@ -478,19 +476,20 @@ class Msfcli
478476
when "i"
479477
show_ids_evasion(modules)
480478
when "p"
481-
if ref_name =~ /^auxiliary/
479+
if modules[:module].file_path =~ /auxiliary\//i
482480
$stdout.puts("\nError: This type of module does not support payloads")
483481
else
484482
show_payloads(modules)
485483
end
486484
when "t"
487-
if @args[:module_name] =~ /^auxiliary/i
485+
puts
486+
if modules[:module].file_path =~ /auxiliary\//i
488487
$stdout.puts("\nError: This type of module does not support targets")
489488
else
490489
show_targets(modules)
491490
end
492491
when "ac"
493-
if @args[:module_name] =~ /^auxiliary/i
492+
if modules[:module].file_path =~ /auxiliary\//i
494493
show_actions(modules)
495494
else
496495
$stdout.puts("\nError: This type of module does not support actions")

0 commit comments

Comments
 (0)