From 6d4c234187eb13a5666c0db4ba7b73183644ccdf Mon Sep 17 00:00:00 2001 From: HD Moore Date: Mon, 26 Feb 2007 17:38:01 +0000 Subject: [PATCH] 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 --- lib/msf/core/exploit/dcerpc.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/msf/core/exploit/dcerpc.rb b/lib/msf/core/exploit/dcerpc.rb index 4bd7756a58..8a95cc35ff 100644 --- a/lib/msf/core/exploit/dcerpc.rb +++ b/lib/msf/core/exploit/dcerpc.rb @@ -81,11 +81,8 @@ module Exploit::Remote::DCERPC opts['smb_client'] = self.simple 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) self.simple = self.dcerpc.smb # expose the simple client if we have access to it @@ -111,7 +108,7 @@ module Exploit::Remote::DCERPC end # Useful accessors for tracking DCERPC state - attr_accessor :handle, :dcerpc, :dcerpc_socket + attr_accessor :handle, :dcerpc end