Land #11217, fix syntax and logic errors in badpdf module
commit
86850e7062
|
@ -39,14 +39,14 @@ class MetasploitModule < Msf::Auxiliary
|
||||||
end
|
end
|
||||||
|
|
||||||
def run
|
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'
|
print_error 'Please configure either FILENAME or PDFINJECT'
|
||||||
elsif !datastore['PDFINJECT'].nil? && datastore['PDFINJECT'].to_s.end_with?('.pdf')
|
elsif !datastore['PDFINJECT'].nil? && datastore['PDFINJECT'].to_s.end_with?('.pdf')
|
||||||
injectpdf
|
injectpdf
|
||||||
elsif !datastore['FILENAME'].nil? && datastore['FILENAME'].to_s.end_with?('.pdf')
|
elsif !datastore['FILENAME'].nil? && datastore['FILENAME'].to_s.end_with?('.pdf')
|
||||||
createpdf
|
createpdf
|
||||||
else
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue