use the mixin for registry fu.
git-svn-id: file:///home/svn/framework3/trunk@11462 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
99ab6a59dd
commit
a121a73cdb
|
@ -14,6 +14,8 @@ require 'rex'
|
|||
|
||||
class Metasploit3 < Msf::Post
|
||||
|
||||
include Post::Registry
|
||||
|
||||
def initialize(info={})
|
||||
super( update_info( info,
|
||||
'Name' => 'Get environment',
|
||||
|
@ -66,20 +68,5 @@ class Metasploit3 < Msf::Post
|
|||
print_line chan.read
|
||||
end
|
||||
end
|
||||
|
||||
def registry_enumvals(key)
|
||||
values = []
|
||||
begin
|
||||
vals = {}
|
||||
root_key, base_key = session.sys.registry.splitkey(key)
|
||||
open_key = session.sys.registry.open_key(root_key, base_key, KEY_READ)
|
||||
vals = open_key.enum_value
|
||||
vals.each { |val|
|
||||
values << val.name
|
||||
}
|
||||
open_key.close
|
||||
end
|
||||
return values
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue