mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Performance improvement in telnet-brute.
By nnposter. http://seclists.org/nmap-dev/2013/q3/413
This commit is contained in:
parent
695be03e60
commit
f6c83d2a37
1 changed files with 5 additions and 2 deletions
|
|
@ -321,7 +321,7 @@ end
|
|||
|
||||
|
||||
---
|
||||
-- Set the calling thread up as one of the worker threads
|
||||
-- Set up the calling thread as one of the worker threads
|
||||
--
|
||||
-- @param self Target object
|
||||
Target.methods.worker = function (self)
|
||||
|
|
@ -373,7 +373,6 @@ end
|
|||
--
|
||||
-- @param self Target object
|
||||
-- @param inuse Whether the worker is in use (true or false)
|
||||
-- (INIT, EXEC, PARK)
|
||||
-- @return inuse
|
||||
Target.methods.inuse = function (self, inuse)
|
||||
self.workers[coroutine.running()].inuse = inuse
|
||||
|
|
@ -476,6 +475,10 @@ end
|
|||
-- @return nil if the operation was successful; error code otherwise
|
||||
Driver.methods.disconnect = function (self)
|
||||
assert(self.conn, "Attempt to disconnect non-existing connection")
|
||||
if self.conn.isopen and not self.conn.error then
|
||||
-- try to reach new login prompt
|
||||
self:prompt()
|
||||
end
|
||||
self.conn = nil
|
||||
return self.target:detach()
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue