Fix a problem where a dcerpc exploit will only work once before the framework must be reloaded

git-svn-id: file:///home/svn/framework3/trunk@4476 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2007-02-26 17:38:01 +00:00
parent 6fe02e7fd8
commit 6d4c234187
1 changed files with 2 additions and 5 deletions

View File

@ -81,11 +81,8 @@ module Exploit::Remote::DCERPC
opts['smb_client'] = self.simple opts['smb_client'] = self.simple
end end
if (self.sock and not self.dcerpc_socket)
self.dcerpc_socket = self.sock
end
self.dcerpc = Rex::Proto::DCERPC::Client.new(h, self.dcerpc_socket, opts) self.dcerpc = Rex::Proto::DCERPC::Client.new(h, self.sock, opts)
if (self.handle.protocol == 'ncacn_np' and not self.simple) if (self.handle.protocol == 'ncacn_np' and not self.simple)
self.simple = self.dcerpc.smb # expose the simple client if we have access to it self.simple = self.dcerpc.smb # expose the simple client if we have access to it
@ -111,7 +108,7 @@ module Exploit::Remote::DCERPC
end end
# Useful accessors for tracking DCERPC state # Useful accessors for tracking DCERPC state
attr_accessor :handle, :dcerpc, :dcerpc_socket attr_accessor :handle, :dcerpc
end end