lib/msf/core/module_manager.rb
#
# This method automatically subscribes a module to whatever event providers
# it wishes to monitor.  This can be used to allow modules to automatically
# execute or perform other tasks when certain events occur.  For instance,
# when a new host is detected, other aux modules may wish to run such
# that they can collect more information about the host that was detected.
#
This method automatically subscribes a module to whatever event providers
it wishes to monitor.  This can be used to allow modules to automatically
execute or perform other tasks when certain events occur.  For instance,
when a new host is detected, other aux modules may wish to run such
that they can collect more information about the host that was detected.
This method automatically subscribes a module to whatever event providers it wishes to monitor . This can be used to allow modules to automatically execute or perform other tasks when certain events occur . For instance when a new host is detected other aux modules may wish to run such that they can collect more information about the host that was detected .
def auto_subscribe_module(mod)
		if (framework.datastore['DisableAutoSubscribe'] and
		    framework.datastore['DisableAutoSubscribe'] =~ /^(y|1|t)/)
			return
		end
		inst = nil
		 Exploit event subscriber check
		if (mod.include?(ExploitEvent) == true)
			framework.events.add_exploit_subscriber((inst) ? inst : (inst = mod.new))
		end
		 Session event subscriber check
		if (mod.include?(SessionEvent) == true)
			framework.events.add_session_subscriber((inst) ? inst : (inst = mod.new))
		end
	end
def auto_subscribe_module ( mod ) if ( framework . datastore [ 'DisableAutoSubscribe' ] and framework . datastore [ 'DisableAutoSubscribe' ] =~ / ^(y|1|t) / ) return end inst = nil if ( mod . include? ( ExploitEvent ) == true ) framework . events . add_exploit_subscriber ( ( inst ) ? inst : ( inst = mod . new ) ) end if ( mod . include? ( SessionEvent ) == true ) framework . events . add_session_subscriber ( ( inst ) ? inst : ( inst = mod . new ) ) end end
This method automatically subscribes a module to whatever event providers
it wishes to monitor.
This method automatically subscribes a module to whatever event providers it wishes to monitor .
# If auto-subscribe has been disabled # If auto-subscription is enabled (which it is by default), figure out # if it subscribes to any particular interfaces. # # Exploit event subscriber check # # # Session event subscriber check #
mod
<not_specific>