Change the HOST IP logic again
parent
9980e8f285
commit
8efb4df8af
|
@ -654,7 +654,16 @@ module Msf
|
|||
|
||||
exploit_list.each do |mod|
|
||||
proto = datastore['SSL'] ? 'https' : 'http'
|
||||
host = datastore['URIHOST'] || datastore['SRVHOST'] || Rex::Socket.source_address
|
||||
host = ''
|
||||
if datastore['URIHOST']
|
||||
host = datastore['URIHOST']
|
||||
elsif cli
|
||||
host = cli.peerhost
|
||||
elsif datastore['SRVHOST'] != '0.0.0.0'
|
||||
host = datastore['SRVHOST']
|
||||
else
|
||||
host = Rex::Socket.source_address
|
||||
end
|
||||
port = datastore['SRVPORT']
|
||||
resource = mod.datastore['URIPATH']
|
||||
url = "#{proto}://#{host}:#{port}#{resource}"
|
||||
|
|
Loading…
Reference in New Issue