Skip to content

Commit 8287dd3

Browse files
committed
Merge pull request rapid7#1941 from jlee-r7/http-server-inspect
Functional tests in msfconsole passing, as are MSF and Pro specs. References in Pro to items that appeared session related were either debug oriented or commented out.
2 parents ff8afc1 + af613ee commit 8287dd3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/rex/proto/http/server.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,14 @@ def initialize(port = 80, listen_host = '0.0.0.0', ssl = false, context = {}, co
113113
self.server_name = DefaultServer
114114
end
115115

116+
# More readable inspect that only shows the url and resources
117+
# @return [String]
118+
def inspect
119+
resources_str = resources.keys.map{|r| r.inspect }.join ", "
120+
121+
"#<#{self.class} http#{ssl ? "s" : ""}://#{listen_host}:#{listen_port} [ #{resources_str} ]>"
122+
end
123+
116124
#
117125
# Returns the hardcore alias for the HTTP service
118126
#

0 commit comments

Comments
 (0)