Merge pull request #15 from wvu-r7/pr/4573

Fix typo and add Subject support
bug/bundler_fix
dmaloney-r7 2015-01-14 09:45:47 -06:00
commit 052c14be69
1 changed files with 6 additions and 1 deletions

View File

@ -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