1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-12 11:52:01 +01:00

Cleanly handle EOFError's from DCERPC services. This fixes #27

git-svn-id: file:///home/svn/framework3/trunk@4453 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
HD Moore 2007-02-21 03:58:44 +00:00
parent b527934d06
commit fe540a3001

View File

@ -227,10 +227,19 @@ require 'rex/proto/smb/exceptions'
self.write(packet)
}
raw_response = self.read()
if (raw_response == nil or raw_response.length == 0)
raw_response = ''
begin
raw_response = self.read()
rescue ::EOFError
raise Rex::Proto::DCERPC::Exceptions::NoResponse
end
if (raw_response == nil or raw_response.length == 0)
raise Rex::Proto::DCERPC::Exceptions::NoResponse
end
self.last_response = Rex::Proto::DCERPC::Response.new(raw_response)
if self.last_response.type == 3