module Rex::Post::Meterpreter::ObjectAliasesContainer
Mixin for classes that wish to have object aliases but do not really need to inherit from the ObjectAliases
class.
Attributes
aliases[RW]
The hash of aliases.
Public Instance Methods
dump_alias_tree(parent_path, current = nil)
click to toggle source
Recursively dumps all of the aliases registered with a class that is kind_of? ObjectAliases
.
# File lib/rex/post/meterpreter/object_aliases.rb, line 32 def dump_alias_tree(parent_path, current = nil) items = [] if (current == nil) current = self end # If the current object may have object aliases... if (current.kind_of?(Rex::Post::Meterpreter::ObjectAliases)) current.aliases.each_key { |x| current_path = parent_path + '.' + x items << current_path items.concat(dump_alias_tree(current_path, current.aliases[x])) } end return items end
initialize_aliases(aliases = {})
click to toggle source
Initialize the instance's aliases.
# File lib/rex/post/meterpreter/object_aliases.rb, line 17 def initialize_aliases(aliases = {}) self.aliases = aliases end
method_missing(symbol, *args)
click to toggle source
Pass-thru aliases.
# File lib/rex/post/meterpreter/object_aliases.rb, line 24 def method_missing(symbol, *args) self.aliases[symbol.to_s] end