Skip to content

Commit 052c14b

Browse files
dmaloney-r7dmaloney-r7
authored andcommitted
Merge pull request #15 from wvu-r7/pr/4573
Fix typo and add Subject support
2 parents 6dad66c + f0de45c commit 052c14b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/msf/core/exploit/smtp_deliver.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,18 @@ def send_message(data)
142142
raw_send_recv("RCPT TO: <#{datastore['MAILTO']}>\r\n", nsock)
143143

144144
# If the user supplied a Date field, use that, else use the current
145-
# DateTime in the propper RFC2822 format.
145+
# DateTime in the proper RFC2822 format.
146146
if datastore['DATE'].present?
147147
raw_send_recv("Date: #{datastore['DATE']}\r\n", nsock)
148148
else
149149
raw_send_recv("Date: #{DateTime.now.rfc2822}\r\n", nsock)
150150
end
151151

152+
# If the user supplied a Subject field, use that
153+
if datastore['SUBJECT'].present?
154+
raw_send_recv("Subject: #{datastore['SUBJECT']}\r\n", nsock)
155+
end
156+
152157
resp = raw_send_recv("DATA\r\n", nsock)
153158

154159
# Avoid sending tons of data and killing the connection if the server

0 commit comments

Comments
 (0)