Skip to content

Commit 35c9a13

Browse files
committed
Handle the usage of // (same-scheme) URLs.
1 parent 7876401 commit 35c9a13

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

modules/auxiliary/gather/apple_safari_webarchive_uxss.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def initialize(info = {})
4747
register_options(
4848
[
4949
OptString.new('FILENAME', [ true, 'The file name.', 'msf.webarchive']),
50-
OptString.new('URLS', [ true, 'A space-delimited list of URLs to UXSS (eg http://browserscan.rapid7.com/']),
50+
OptString.new('URLS', [ true, 'A space-delimited list of URLs to UXSS (eg http://rapid7.com http://example.com']),
5151
OptString.new('URIPATH', [false, 'The URI to receive the UXSS\'ed data', '/grab']),
5252
OptString.new('DOWNLOAD_PATH', [ true, 'The path to download the webarhive.', '/msf.webarchive']),
5353
OptString.new('URLS', [ true, 'The URLs to steal cookie and form data from.', '']),
@@ -768,8 +768,11 @@ def find_cached_scripts
768768
if script_uri.relative?
769769
url = page_uri + url
770770
end
771+
if url.to_s.starts_with? '//'
772+
url = "#{page_uri.scheme}:"+url
773+
end
771774
io = open(url)
772-
rescue URI::InvalidURIError => e
775+
rescue URI::InvalidURIError, OpenURI::HTTPError
773776
next
774777
end
775778

0 commit comments

Comments
 (0)