Skip to content

Commit 6a68888

Browse files
author
Brent Cook
committed
Land rapid7#4590, jvennix-r7's fix for same-scheme URLs
made a trivial string formatting tweak
2 parents c1e604f + 7ef721b commit 6a68888

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

modules/auxiliary/gather/apple_safari_webarchive_uxss.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ 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']),
52-
OptString.new('DOWNLOAD_PATH', [ true, 'The path to download the webarhive.', '/msf.webarchive']),
52+
OptString.new('DOWNLOAD_PATH', [ true, 'The path to download the webarchive.', '/msf.webarchive']),
5353
OptString.new('URLS', [ true, 'The URLs to steal cookie and form data from.', '']),
5454
OptString.new('FILE_URLS', [false, 'Additional file:// URLs to steal.', '']),
5555
OptBool.new('STEAL_COOKIES', [true, "Enable cookie stealing.", true]),
@@ -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)