ninja chop
git-svn-id: file:///home/svn/incoming/trunk@2503 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
b2ff28c8f6
commit
64ec9bf338
|
@ -24,6 +24,14 @@ MODULE_ENCODER = 'encoder'
|
||||||
MODULE_EXPLOIT = 'exploit'
|
MODULE_EXPLOIT = 'exploit'
|
||||||
MODULE_NOP = 'nop'
|
MODULE_NOP = 'nop'
|
||||||
MODULE_RECON = 'recon'
|
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
|
end
|
||||||
|
|
|
@ -72,6 +72,11 @@ end
|
||||||
# takes care of the work of managing the interaction with
|
# takes care of the work of managing the interaction with
|
||||||
# modules in terms of loading and instantiation.
|
# modules in terms of loading and instantiation.
|
||||||
#
|
#
|
||||||
|
# TODO:
|
||||||
|
#
|
||||||
|
# - add reload support
|
||||||
|
# - add unload support
|
||||||
|
#
|
||||||
###
|
###
|
||||||
class ModuleManager < Array
|
class ModuleManager < Array
|
||||||
|
|
||||||
|
@ -87,22 +92,31 @@ class ModuleManager < Array
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns the array of loaded encoder module classes
|
#
|
||||||
|
# Accessors by module type
|
||||||
|
#
|
||||||
|
|
||||||
|
# Returns the set of loaded encoder module classes
|
||||||
def encoders
|
def encoders
|
||||||
return modules_by_type[MODULE_ENCODER]
|
return modules_by_type[MODULE_ENCODER]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns the array of loaded nop module classes
|
# Returns the set of loaded nop module classes
|
||||||
def nops
|
def nops
|
||||||
return modules_by_type[MODULE_NOPS]
|
return modules_by_type[MODULE_NOPS]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns the array of loaded exploit module classes
|
# Returns the set of loaded exploit module classes
|
||||||
def exploits
|
def exploits
|
||||||
return modules_by_type[MODULE_EXPLOIT]
|
return modules_by_type[MODULE_EXPLOIT]
|
||||||
end
|
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
|
def recon
|
||||||
return modules_by_type[MODULE_RECON]
|
return modules_by_type[MODULE_RECON]
|
||||||
end
|
end
|
||||||
|
|
|
@ -13,8 +13,8 @@ framework = Msf::Framework.new
|
||||||
framework.modules.add_module_path('/home/mmiller/msf/rubyhacks/prototype/Modules')
|
framework.modules.add_module_path('/home/mmiller/msf/rubyhacks/prototype/Modules')
|
||||||
|
|
||||||
|
|
||||||
framework.encoders.each { |encoder|
|
framework.encoders.each_module { |name|
|
||||||
puts "got encoder #{encoder}"
|
puts "got encoder #{name}"
|
||||||
}
|
}
|
||||||
|
|
||||||
encoder = framework.encoders.create('JmpCallAdditive')
|
encoder = framework.encoders.create('JmpCallAdditive')
|
||||||
|
|
Loading…
Reference in New Issue