Skip to content

Commit d7ba37d

Browse files
author
RageLtMan
committed
Msf::Exploit::Remote::HttpServer print_* fix
Exploit::Remote::HttpServer and every descendant utilizes the print_prefix method which checks whether the module which mixes in these modules is aggressive. This is done in a proc context most of the time since its a callback on the underlying Rex HTTP server. When modules do not define :aggressive? the resulting exceptions are quietly swallowed, and requestors get an empty response as the client object dies off. Add check for response to :aggressive? in :print_prefix to address this issue.
1 parent b868f7c commit d7ba37d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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 && !aggressive?
76+
if cli && (respond_to?(:aggressive) && !aggressive?)
7777
super + "#{cli.peerhost.ljust(16)} #{self.shortname} - "
7878
else
7979
super

0 commit comments

Comments
 (0)