We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9980e8f commit 8efb4dfCopy full SHA for 8efb4df
lib/msf/core/exploit/browser_autopwnv2.rb
@@ -654,7 +654,16 @@ def get_exploit_urls(cli, request)
654
655
exploit_list.each do |mod|
656
proto = datastore['SSL'] ? 'https' : 'http'
657
- host = datastore['URIHOST'] || datastore['SRVHOST'] || Rex::Socket.source_address
+ host = ''
658
+ if datastore['URIHOST']
659
+ host = datastore['URIHOST']
660
+ elsif cli
661
+ host = cli.peerhost
662
+ elsif datastore['SRVHOST'] != '0.0.0.0'
663
+ host = datastore['SRVHOST']
664
+ else
665
+ host = Rex::Socket.source_address
666
+ end
667
port = datastore['SRVPORT']
668
resource = mod.datastore['URIPATH']
669
url = "#{proto}://#{host}:#{port}#{resource}"
0 commit comments