Land #4758, SMTPDeliver DATA header fix

bug/bundler_fix
William Vu 2015-02-12 15:07:31 -06:00
commit 39c0065560
No known key found for this signature in database
GPG Key ID: 68BD00CE25866743
1 changed files with 2 additions and 2 deletions

View File

@ -141,6 +141,8 @@ module Exploit::Remote::SMTPDeliver
raw_send_recv("MAIL FROM: <#{datastore['MAILFROM']}>\r\n", nsock)
raw_send_recv("RCPT TO: <#{datastore['MAILTO']}>\r\n", nsock)
resp = raw_send_recv("DATA\r\n", nsock)
# If the user supplied a Date field, use that, else use the current
# DateTime in the proper RFC2822 format.
if datastore['DATE'].present?
@ -154,8 +156,6 @@ module Exploit::Remote::SMTPDeliver
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
# didn't like us.
if not resp or not resp[0,3] == '354'