trim leading and trailing whitespace in mail addresses
parent
f39e378496
commit
544ea6926c
|
@ -166,8 +166,11 @@ module Exploit::Remote::SMTPDeliver
|
|||
nsock = connect_login(false)
|
||||
end
|
||||
|
||||
raw_send_recv("MAIL FROM: <#{datastore['MAILFROM']}>\r\n", nsock)
|
||||
res = raw_send_recv("RCPT TO: <#{datastore['MAILTO']}>\r\n", nsock)
|
||||
mailto = datastore['MAILTO'].strip
|
||||
mailfrom = datastore['MAILFROM'].strip
|
||||
|
||||
raw_send_recv("MAIL FROM: <#{mailfrom}>\r\n", nsock)
|
||||
res = raw_send_recv("RCPT TO: <#{mailto}>\r\n", nsock)
|
||||
if res[0..2] == '250'
|
||||
resp = raw_send_recv("DATA\r\n", nsock)
|
||||
|
||||
|
@ -199,7 +202,7 @@ module Exploit::Remote::SMTPDeliver
|
|||
send_status = raw_send_recv("#{full_msg}\r\n.\r\n", nsock)
|
||||
end
|
||||
else
|
||||
print_error "Server refused to send to <#{datastore['MAILTO']}>"
|
||||
print_error "Server refused to send to <#{mailto}>"
|
||||
end
|
||||
|
||||
if not already_connected
|
||||
|
|
Loading…
Reference in New Issue