Land #6854, smtp header fix

Fixes an issue with duplicate headers when sending emails.

Fixes MS-1476
bug/bundler_fix 4.11.26
Kyle Gray 2016-05-06 12:07:12 -05:00
commit 2a546d191f
No known key found for this signature in database
GPG Key ID: 5F604D93CA5FEE1A
2 changed files with 2 additions and 3 deletions

View File

@ -163,8 +163,8 @@ module Exploit::Remote::SMTPDeliver
print_error("Server refused our mail") print_error("Server refused our mail")
else else
full_msg = '' full_msg = ''
full_msg << date full_msg << date unless data =~ /date: /i
full_msg << subject unless subject.nil? full_msg << subject unless subject.nil? || data =~ /subject: /i
full_msg << data full_msg << data
send_status = raw_send_recv("#{full_msg}\r\n.\r\n", nsock) send_status = raw_send_recv("#{full_msg}\r\n.\r\n", nsock)
end end

View File

@ -119,7 +119,6 @@ class MetasploitModule < Msf::Auxiliary
datastore['MAILFROM'] = from datastore['MAILFROM'] = from
msg = load_file(msg_file) msg = load_file(msg_file)
email_sig = load_file(sig_file)
if (type !~ /text/i and type !~ /text\/html/i) if (type !~ /text/i and type !~ /text\/html/i)
print_error("YAML config: #{type}") print_error("YAML config: #{type}")