diff --git a/lib/msf/core/exploit/http/server.rb b/lib/msf/core/exploit/http/server.rb index e0ecf63d18..07dab63527 100644 --- a/lib/msf/core/exploit/http/server.rb +++ b/lib/msf/core/exploit/http/server.rb @@ -425,7 +425,7 @@ module Exploit::Remote::HttpServer host = "[#{host}]" end - if datastore['URIPORT'] != 0 + if datastore['URIPORT'] && datastore['URIPORT'] != 0 port = ':' + datastore['URIPORT'].to_s elsif (ssl and datastore["SRVPORT"] == 443) port = ''