From f0de45c371bdc90f377c2497c91084356332550a Mon Sep 17 00:00:00 2001 From: William Vu Date: Wed, 14 Jan 2015 02:17:29 -0600 Subject: [PATCH] Fix typo and add Subject support --- lib/msf/core/exploit/smtp_deliver.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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