Permalink
Browse files

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

  • Loading branch information...
busterb committed Jan 10, 2019
2 parents 5d92774 + cf1b4b4 commit 86850e70627e45cf14a7c47e88904d75d3da438d
Showing with 2 additions and 2 deletions.
  1. +2 −2 modules/auxiliary/fileformat/badpdf.rb
@@ -39,14 +39,14 @@ def initialize(info = {})
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

0 comments on commit 86850e7

Please sign in to comment.