corrected some stuff
git-svn-id: file:///home/svn/incoming/trunk@2982 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
2e7a7dbe8d
commit
204a215bc7
|
@ -257,6 +257,7 @@ class Recon < Msf::Module
|
|||
|
||||
require 'msf/core/recon/discoverer'
|
||||
require 'msf/core/recon/entity'
|
||||
require 'msf/core/recon/event_context'
|
||||
|
||||
#
|
||||
# Returns MODULE_RECON to indicate that this is a recon module.
|
||||
|
|
|
@ -165,14 +165,14 @@ protected
|
|||
|
||||
# If a hash was returned, we should create an event context to
|
||||
# pass to the notification.
|
||||
if (state.kind_of?(Hash))
|
||||
if (istate.kind_of?(Hash))
|
||||
context = Msf::Recon::EventContext.new
|
||||
|
||||
# Serialize the context from the hash
|
||||
context.from_hash(state)
|
||||
|
||||
# Grab the real state from the hash
|
||||
state = istate['State']
|
||||
state = istate['state']
|
||||
end
|
||||
|
||||
# Report the host's state to the recon manager.
|
||||
|
@ -181,7 +181,7 @@ protected
|
|||
|
||||
# Perform cleanup as necessary (only if istate was a Hash)
|
||||
if (context)
|
||||
probe_host_cleanup(ip, state)
|
||||
probe_host_cleanup(ip, istate)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -41,10 +41,11 @@ class Recon::Host::PortScanner::TcpConnSweep < Msf::Recon::Discoverer::Host
|
|||
'PeerPort' => datastore['RPORT'].to_i,
|
||||
'LocalHost' => datastore['CHOST'] || '0.0.0.0',
|
||||
'LocalPort' => datastore['CPORT'] ? datastore['CPORT'].to_i : 0))
|
||||
[
|
||||
|
||||
{
|
||||
'state' => HostState::Alive,
|
||||
'connection' => sock
|
||||
]
|
||||
}
|
||||
end
|
||||
# If we get connection refused, then we are indirectly determining that
|
||||
# the host is alive.
|
||||
|
@ -61,7 +62,7 @@ class Recon::Host::PortScanner::TcpConnSweep < Msf::Recon::Discoverer::Host
|
|||
# Cleans up
|
||||
#
|
||||
def probe_host_cleanup(ip, state)
|
||||
state['Connection'].close
|
||||
state['connection'].close
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue