Fix typo and add Subject support

bug/bundler_fix
William Vu 2015-01-14 02:17:29 -06:00
parent 6dad66c04c
commit f0de45c371
No known key found for this signature in database
GPG Key ID: 68BD00CE25866743
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