lib/msf/core/module_manager.rb
#
# Load all of the modules from the supplied fastlib archive
#
Load all of the modules from the supplied fastlib archive
Load all of the modules from the supplied fastlib archive
def load_modules_from_archive(bpath, demand = false)
		loaded = {}
		recalc = {}
		counts = {}
		delay  = {}
		ks     = true
		::FastLib.list(bpath).each do |ent|
			next if ent.index(".svn/")
			mtype, path = ent.split("/", 2)
			mtype.sub!(/s$/, '')
			next if not MODULE_TYPES.include?(mtype)
			next if not enabled_types[mtype]
			next if ent[-3,3] != ".rb"
			next if (ent =~ /rb\.(ut|ts)\.rb$/)
			next if ent[0,1] == "."
			load_module_from_archive(bpath, ent, loaded, recalc, counts, demand)
		end
		recalc.each_key do |mtype|
			module_set(mtype).recalculate		
		end
		return counts
	end
def load_modules_from_archive ( bpath , demand = false ) loaded = { } recalc = { } counts = { } delay = { } ks = true :: FastLib . list ( bpath ) . each do | ent | next if ent . index ( ".svn/" ) mtype , path = ent . split ( "/" , 2 ) mtype . sub! ( / s$ / , '' ) next if not MODULE_TYPES . include? ( mtype ) next if not enabled_types [ mtype ] next if ent [ - 3 , 3 ] != ".rb" next if ( ent =~ / rb \. (ut|ts) \. rb$ / ) next if ent [ 0 , 1 ] == "." load_module_from_archive ( bpath , ent , loaded , recalc , counts , demand ) end recalc . each_key do | mtype | module_set ( mtype ) . recalculate end return counts end
Load all of the modules from the supplied fastlib archive
Load all of the modules from the supplied fastlib archive
# Skip non-ruby files # Skip unit test files # Skip files with a leading period # Return per-module loaded counts
bpath
<not_specific>
demand
<not_specific>