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-b9f4589650daunstable
parent
7b516e06fe
commit
09eb53be5b
|
@ -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
|
||||
|
||||
#
|
||||
|
|
|
@ -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
|
||||
|
||||
#
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue