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
parent
807142e988
commit
9ea6d84a7a
|
@ -79,10 +79,14 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
startxrefs = pdf_objects[2]
|
||||
root_obj = pdf_objects[3]
|
||||
|
||||
output = basic_social_engineering_exploit(xref_trailers,root_obj,stream,trailers,file_name,exe_name,startxrefs.last)
|
||||
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)
|
||||
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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue