Skip to content

Commit f5fccde

Browse files
committed
Land rapid7#8077, srvport for HttpServer
it.
2 parents 1c9a890 + 1a0b342 commit f5fccde

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,19 @@ def srvhost_addr
490490
host
491491
end
492492

493+
#
494+
# Returns the local port that is being listened on.
495+
#
496+
def srvport
497+
if datastore['URIPORT']
498+
port = datastore['URIPORT']
499+
else
500+
port = datastore['SRVPORT']
501+
end
502+
503+
port
504+
end
505+
493506
#
494507
# Removes a URI resource.
495508
#

0 commit comments

Comments
 (0)