clear any additional response on smtp connect
When connecting to an SMTP server after `HELO` and auth complete there can be additional data sent from the client that sits in the socket queue. Adding a `get_once` after connection has settled ensure any pending for extension responses are cleared.
This commit is contained in:
parent
a554a98965
commit
5bc60f5bf7
|
@ -244,6 +244,10 @@ module Exploit::Remote::SMTPDeliver
|
|||
begin
|
||||
nsock.put(cmd)
|
||||
res = nsock.get_once
|
||||
# read until `nil` is returned
|
||||
while chunk = nsock.get_once
|
||||
res += chunk
|
||||
end
|
||||
rescue
|
||||
return nil
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue