diff --git a/lib/msf/core/exploit/smtp_deliver.rb b/lib/msf/core/exploit/smtp_deliver.rb index a34dfaa743..52d100a141 100644 --- a/lib/msf/core/exploit/smtp_deliver.rb +++ b/lib/msf/core/exploit/smtp_deliver.rb @@ -142,13 +142,18 @@ module Exploit::Remote::SMTPDeliver raw_send_recv("RCPT TO: <#{datastore['MAILTO']}>\r\n", nsock) # If the user supplied a Date field, use that, else use the current - # DateTime in the propper RFC2822 format. + # DateTime in the proper RFC2822 format. if datastore['DATE'].present? raw_send_recv("Date: #{datastore['DATE']}\r\n", nsock) else raw_send_recv("Date: #{DateTime.now.rfc2822}\r\n", nsock) end + # If the user supplied a Subject field, use that + if datastore['SUBJECT'].present? + raw_send_recv("Subject: #{datastore['SUBJECT']}\r\n", nsock) + end + resp = raw_send_recv("DATA\r\n", nsock) # Avoid sending tons of data and killing the connection if the server