Permalink
Browse files

carlos forgot to delete this, see r11550, r11551

git-svn-id: file:///home/svn/framework3/trunk@11624 4d416f70-5f16-0410-b530-b9f4589650da
  • Loading branch information...
1 parent d7cda0f commit 8bf60c6d114b655350efaeef842985e2e0c96f19 @jlee-r7 jlee-r7 committed Jan 22, 2011
Showing with 0 additions and 106 deletions.
  1. +0 −106 lib/msf/core/post/registry.rb
@@ -1,106 +0,0 @@
-module Msf
-class Post
-
-module Registry
-
- #Returns the data and type of a given registry key and value
- def registry_getvalinfo(key,valname)
- value = {}
- begin
- root_key, base_key = session.sys.registry.splitkey(key)
- open_key = session.sys.registry.open_key(root_key, base_key, KEY_READ)
- v = open_key.query_value(valname)
- value["Data"] = v.data
- value["Type"] = v.type
- open_key.close
- end
- return value
- end
- #Returns the data of a given registry key and value
- def registry_getvaldata(key,valname)
- value = nil
- begin
- root_key, base_key = session.sys.registry.splitkey(key)
- open_key = session.sys.registry.open_key(root_key, base_key, KEY_READ)
- v = open_key.query_value(valname)
- value = v.data
- open_key.close
- end
- return value
- end
- #Sets the data for a given value and type of data on the target registry returns true if succesful
- def registry_setvaldata(key,valname,data,type)
- begin
- root_key, base_key = session.sys.registry.splitkey(key)
- open_key = session.sys.registry.open_key(root_key, base_key, KEY_WRITE)
- open_key.set_value(valname, session.sys.registry.type2str(type), data)
- open_key.close
- return true
- end
- end
- #Deletes a registry value given the key and value name returns true if succesful
- def registry_deleteval(key,valname)
- begin
- root_key, base_key = session.sys.registry.splitkey(key)
- open_key = session.sys.registry.open_key(root_key, base_key, KEY_WRITE)
- open_key.delete_value(valname)
- open_key.close
- return true
- end
- end
- #Enumerates the values of a given registry key returns array of value names
- 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
- #Enumerates the subkeys of a given registry key returns array of subkeys
- def registry_enumkeys(key)
- subkeys = []
- begin
- root_key, base_key = session.sys.registry.splitkey(key)
- open_key = session.sys.registry.open_key(root_key, base_key, KEY_READ)
- keys = open_key.enum_key
- keys.each { |subkey|
- subkeys << subkey
- }
- open_key.close
- end
- return subkeys
- end
-
- # Create a given registry key returns true if succesful
- def registry_createkey(key)
- begin
- root_key, base_key = session.sys.registry.splitkey(key)
- open_key = session.sys.registry.create_key(root_key, base_key)
- open_key.close
- return true
- end
-
- end
-
- # Delete a given registry key returns true if succesful
- def registry_delkey(key)
- begin
- root_key, base_key = session.sys.registry.splitkey(key)
- open_key = session.sys.registry.delete_key(root_key, base_key)
- open_key.close
- return true
- end
-
- end
-
-end
-end
-end
-

0 comments on commit 8bf60c6

Please sign in to comment.