From 9f5dfab9ea05e02a1ac92540233adca412fb873d Mon Sep 17 00:00:00 2001 From: joev Date: Sat, 31 May 2014 16:14:52 -0500 Subject: [PATCH] Add better interface for specifying custom #eol. --- lib/msf/core/exploit/pdf.rb | 4 ++++ .../android/fileformat/adobe_reader_pdf_js_interface.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/msf/core/exploit/pdf.rb b/lib/msf/core/exploit/pdf.rb index 19b9a9204a..3cf02f4bee 100644 --- a/lib/msf/core/exploit/pdf.rb +++ b/lib/msf/core/exploit/pdf.rb @@ -206,6 +206,10 @@ module Exploit::PDF @eol || "\x0d\x0a" end + def eol=(new_eol) + @eol = new_eol + end + def endobj "endobj" << eol end diff --git a/modules/exploits/android/fileformat/adobe_reader_pdf_js_interface.rb b/modules/exploits/android/fileformat/adobe_reader_pdf_js_interface.rb index 9f1dd2c4c1..b5d44669f6 100644 --- a/modules/exploits/android/fileformat/adobe_reader_pdf_js_interface.rb +++ b/modules/exploits/android/fileformat/adobe_reader_pdf_js_interface.rb @@ -72,7 +72,7 @@ class Metasploit3 < Msf::Exploit::Remote end def pdf(js) - @eol = "\x0d" + self.eol = "\x0d" @xref = {} @pdf = header('1.6')