From 2dbf7319461cf33fbad849d36d0454942caf3e42 Mon Sep 17 00:00:00 2001 From: James Lee Date: Thu, 21 Oct 2010 17:10:46 +0000 Subject: [PATCH] fix ArgumentError in everything that closes a process handle git-svn-id: file:///home/svn/framework3/trunk@10776 4d416f70-5f16-0410-b530-b9f4589650da --- lib/rex/post/meterpreter/extensions/stdapi/sys/process.rb | 4 ++-- lib/rex/post/meterpreter/extensions/stdapi/sys/thread.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rex/post/meterpreter/extensions/stdapi/sys/process.rb b/lib/rex/post/meterpreter/extensions/stdapi/sys/process.rb index 74df479539..d118ac853d 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/sys/process.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/sys/process.rb @@ -309,7 +309,7 @@ class Process < Rex::Post::Process # # Closes the handle to the process that was opened. # - def self.close(client,handle) + def self.close(client, handle) request = Packet.create_request('stdapi_sys_process_close') request.add_tlv(TLV_TYPE_HANDLE, handle) response = client.send_request(request) @@ -320,7 +320,7 @@ class Process < Rex::Post::Process # # Instance method # - def close(handle) + def close(handle=self.handle) self.class.close(self.client, handle) end diff --git a/lib/rex/post/meterpreter/extensions/stdapi/sys/thread.rb b/lib/rex/post/meterpreter/extensions/stdapi/sys/thread.rb index d97643aed6..74a9f3927d 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/sys/thread.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/sys/thread.rb @@ -167,7 +167,7 @@ class Thread < Rex::Post::Thread end # Instance method - def self.close + def close self.class.close(self.process.client, self.handle) end