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

git-svn-id: file:///home/svn/framework3/trunk@4453 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2007-02-21 03:58:44 +00:00
parent b527934d06
commit fe540a3001
1 changed files with 11 additions and 2 deletions

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