Fix NoMethodError for nil:NilClass bug

The 'unless' statement expects there's always a value for USERNAME
and PASSWORD. We might as well just set '' as the default value
to avoid the NoMethodError mistake.  Related to bug #7140.
This commit is contained in:
sinn3r
2012-09-06 01:09:40 -05:00
parent d7d2669f6c
commit 2cb2b281d6
+2 -2
View File
@@ -29,8 +29,8 @@ module Exploit::Remote::SMTPDeliver
OptString.new('MAILFROM', [ true, 'The FROM address of the e-mail', 'random@example.com' ]),
OptString.new('MAILTO', [ true, 'The TO address of the email' ]),
OptString.new('SUBJECT', [ true, 'Subject line of the email' ]),
OptString.new('USERNAME', [ false, 'SMTP Username for sending email' ]),
OptString.new('PASSWORD', [ false, 'SMTP Password for sending email' ]),
OptString.new('USERNAME', [ false, 'SMTP Username for sending email', '' ]),
OptString.new('PASSWORD', [ false, 'SMTP Password for sending email', '' ]),
OptString.new('VERBOSE', [ false, 'Display verbose information' ]),
], Msf::Exploit::Remote::SMTPDeliver)
register_autofilter_ports([ 25, 465, 587, 2525, 25025, 25000])