Cleanly handle EOFError's from DCERPC services. This fixes #27
git-svn-id: file:///home/svn/framework3/trunk@4453 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
b527934d06
commit
fe540a3001
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue