Skip to content

Commit

Permalink
Land rapid7#7360, restore passive?/aggressive? behavior
Browse files Browse the repository at this point in the history
This PR restores the mod.aggressive? and mod.passive? methods to the
implementation prior to 0f7e3e9.
  • Loading branch information
hdm committed Sep 26, 2016
2 parents b9de73e + 006c749 commit 8bef4e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/msf/core/exploit.rb
Expand Up @@ -649,14 +649,14 @@ def stance
# Returns true if the exploit has an aggressive stance.
#
def aggressive?
(stance == Stance::Aggressive || stance.include?(Stance::Aggressive))
(stance == Stance::Aggressive)
end

#
# Returns if the exploit has a passive stance.
#
def passive?
(stance == Stance::Passive || stance.include?(Stance::Passive))
(stance == Stance::Passive)
end

#
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/exploit/http/server.rb
Expand Up @@ -73,7 +73,7 @@ def cli=(cli)
end

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

0 comments on commit 8bef4e4

Please sign in to comment.