ninja chop

git-svn-id: file:///home/svn/incoming/trunk@2503 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
Matt Miller 2005-05-22 07:23:25 +00:00
parent b2ff28c8f6
commit 64ec9bf338
3 changed files with 29 additions and 7 deletions

View File

@ -24,6 +24,14 @@ MODULE_ENCODER = 'encoder'
MODULE_EXPLOIT = 'exploit'
MODULE_NOP = 'nop'
MODULE_RECON = 'recon'
MODULE_TYPES = [ MODULE_ENCODER, MODULE_EXPLOIT, MODULE_NOP, MODULE_RECON ]
MODULE_PAYLOAD = 'payload'
MODULE_TYPES =
[
MODULE_ENCODER,
MODULE_PAYLOAD,
MODULE_EXPLOIT,
MODULE_NOP,
MODULE_RECON
]
end

View File

@ -72,6 +72,11 @@ end
# takes care of the work of managing the interaction with
# modules in terms of loading and instantiation.
#
# TODO:
#
# - add reload support
# - add unload support
#
###
class ModuleManager < Array
@ -87,22 +92,31 @@ class ModuleManager < Array
}
end
# Returns the array of loaded encoder module classes
#
# Accessors by module type
#
# Returns the set of loaded encoder module classes
def encoders
return modules_by_type[MODULE_ENCODER]
end
# Returns the array of loaded nop module classes
# Returns the set of loaded nop module classes
def nops
return modules_by_type[MODULE_NOPS]
end
# Returns the array of loaded exploit module classes
# Returns the set of loaded exploit module classes
def exploits
return modules_by_type[MODULE_EXPLOIT]
end
# Returns the array of loaded recon module classes
# Returns the set of loaded payload module classes
def payloads
return modules_by_type[MODULE_PAYLOAD]
end
# Returns the set of loaded recon module classes
def recon
return modules_by_type[MODULE_RECON]
end

View File

@ -13,8 +13,8 @@ framework = Msf::Framework.new
framework.modules.add_module_path('/home/mmiller/msf/rubyhacks/prototype/Modules')
framework.encoders.each { |encoder|
puts "got encoder #{encoder}"
framework.encoders.each_module { |name|
puts "got encoder #{name}"
}
encoder = framework.encoders.create('JmpCallAdditive')