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]
|
startxrefs = pdf_objects[2]
|
||||||
root_obj = pdf_objects[3]
|
root_obj = pdf_objects[3]
|
||||||
|
|
||||||
|
begin
|
||||||
output = basic_social_engineering_exploit(xref_trailers,root_obj,stream,trailers,file_name,exe_name,startxrefs.last)
|
output = basic_social_engineering_exploit(xref_trailers,root_obj,stream,trailers,file_name,exe_name,startxrefs.last)
|
||||||
|
|
||||||
print_status("Creating '#{datastore['FILENAME']}' file...")
|
print_status("Creating '#{datastore['FILENAME']}' file...")
|
||||||
file_create(output)
|
file_create(output)
|
||||||
|
rescue KeyError => e
|
||||||
|
print_error("Incompatible PDF structure: #{e.message}. Please try a different PDF.")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue