Skip to content

Commit 63d13f0

Browse files
author
Brent Cook
committed
check if there is a stance set before checking the value
1 parent 30d5b22 commit 63d13f0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

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

7575
def print_prefix
76-
if cli && !(stance == Msf::Exploit::Stance::Aggressive || stance.include?(Msf::Exploit::Stance::Aggressive))
76+
if cli && self.respond_to?(:stance) &&
77+
!(stance == Msf::Exploit::Stance::Aggressive || stance.include?(Msf::Exploit::Stance::Aggressive))
7778
super + "#{cli.peerhost.ljust(16)} #{self.shortname} - "
7879
else
7980
super

0 commit comments

Comments
 (0)