Skip to content

Commit 8bef4e4

Browse files
committed
Land rapid7#7360, restore passive?/aggressive? behavior
This PR restores the mod.aggressive? and mod.passive? methods to the implementation prior to 0f7e3e9.
2 parents b9de73e + 006c749 commit 8bef4e4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/msf/core/exploit.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,14 +649,14 @@ def stance
649649
# Returns true if the exploit has an aggressive stance.
650650
#
651651
def aggressive?
652-
(stance == Stance::Aggressive || stance.include?(Stance::Aggressive))
652+
(stance == Stance::Aggressive)
653653
end
654654

655655
#
656656
# Returns if the exploit has a passive stance.
657657
#
658658
def passive?
659-
(stance == Stance::Passive || stance.include?(Stance::Passive))
659+
(stance == Stance::Passive)
660660
end
661661

662662
#

lib/msf/core/exploit/http/server.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def cli=(cli)
7373
end
7474

7575
def print_prefix
76-
if cli && (respond_to?(:aggressive) && !aggressive?)
76+
if cli && !(stance == Stance::Aggressive || stance.include?(Stance::Aggressive))
7777
super + "#{cli.peerhost.ljust(16)} #{self.shortname} - "
7878
else
7979
super

0 commit comments

Comments
 (0)