Land #11217, fix syntax and logic errors in badpdf module

4.x
Brent Cook 2019-01-10 12:52:08 -06:00 committed by Metasploit
parent 40c2e9ae78
commit 13022ca1ad
No known key found for this signature in database
GPG Key ID: CDFB5FA52007B954
1 changed files with 2 additions and 2 deletions

View File

@ -39,14 +39,14 @@ class MetasploitModule < Msf::Auxiliary
end
def run
if datastore['PDFINJECT'].to_s.end_with?('.pdf') && datastore['FILENAME'].to_s.end_with?('.pdf')
if datastore['PDFINJECT'].nil? && datastore['FILENAME'].nil?
print_error 'Please configure either FILENAME or PDFINJECT'
elsif !datastore['PDFINJECT'].nil? && datastore['PDFINJECT'].to_s.end_with?('.pdf')
injectpdf
elsif !datastore['FILENAME'].nil? && datastore['FILENAME'].to_s.end_with?('.pdf')
createpdf
else
print_error 'FILENAME or PDFINJECT must end with '.pdf' file extension'
print_error "FILENAME or PDFINJECT must end with '.pdf' file extension"
end
end