From 09eb53be5bbdee5d17b084097f0a4574d011d137 Mon Sep 17 00:00:00 2001 From: kris <> Date: Thu, 9 Jul 2009 06:58:11 +0000 Subject: [PATCH] Use the {add|remove}_socket methods in the IP, TCP and UDP mixins instead doing the same things individually in each git-svn-id: file:///home/svn/framework3/trunk@6757 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/core/exploit/ip.rb | 4 ++-- lib/msf/core/exploit/tcp.rb | 6 +++--- lib/msf/core/exploit/udp.rb | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/msf/core/exploit/ip.rb b/lib/msf/core/exploit/ip.rb index 07d22a95c6..27e431aded 100644 --- a/lib/msf/core/exploit/ip.rb +++ b/lib/msf/core/exploit/ip.rb @@ -37,7 +37,7 @@ module Exploit::Remote::Ip self.ip_sock = nsock if (global) # Add this socket to the list of sockets created by this exploit - sockets << nsock + add_socket(nsock) return nsock rescue ::Exception => e @@ -68,7 +68,7 @@ module Exploit::Remote::Ip end # Remove this socket from the list of sockets created by this exploit - sockets.delete(nsock) + remove_socket(nsock) end # diff --git a/lib/msf/core/exploit/tcp.rb b/lib/msf/core/exploit/tcp.rb index 5ffc5e354d..6f1b2bd43b 100644 --- a/lib/msf/core/exploit/tcp.rb +++ b/lib/msf/core/exploit/tcp.rb @@ -101,7 +101,7 @@ module Exploit::Remote::Tcp self.sock = nsock if (global) # Add this socket to the list of sockets created by this exploit - sockets << nsock + add_socket(nsock) return nsock end @@ -139,7 +139,7 @@ module Exploit::Remote::Tcp # Remove this socket from the list of sockets so that it will not be # aborted. - sockets.delete(nsock) + remove_socket(nsock) end return rv @@ -162,7 +162,7 @@ module Exploit::Remote::Tcp end # Remove this socket from the list of sockets created by this exploit - sockets.delete(nsock) + remove_socket(nsock) end # diff --git a/lib/msf/core/exploit/udp.rb b/lib/msf/core/exploit/udp.rb index 97e6e6f678..682639ad08 100644 --- a/lib/msf/core/exploit/udp.rb +++ b/lib/msf/core/exploit/udp.rb @@ -47,7 +47,7 @@ module Exploit::Remote::Udp self.udp_sock = nsock if (global) # Add this socket to the list of sockets created by this exploit - sockets << nsock + add_socket(nsock) return nsock end @@ -69,7 +69,7 @@ module Exploit::Remote::Udp end # Remove this socket from the list of sockets created by this exploit - sockets.delete(nsock) + remove_socket(nsock) end # @@ -85,7 +85,7 @@ module Exploit::Remote::Udp # Remove this socket from the list of sockets so that it will not be # aborted. - sockets.delete(nsock) + remove_socket(nsock) end return rv