grr/client/grr_response_client/vfs_handlers/registry.py
def ListNames(self):
    """List the names of all keys and values."""
    if not self.IsDirectory():
      return

    # Handle the special case where no hive is specified and just list the hives
    if self.hive is None:
      for name in dir(_winreg):
        if name.startswith("HKEY_"):
          yield name

      return

    try:
      with OpenKey(self.hive, self.local_path) as key:
        (self.number_of_keys, self.number_of_values,
         self.last_modified) = QueryInfoKey(key)

        # First keys
        for i in range(self.number_of_keys):
          try:
            yield EnumKey(key, i)
          except OSError:
            pass

        # Now Values
        for i in range(self.number_of_values):
          try:
            name, unused_value, unused_value_type = EnumValue(key, i)

            yield name
          except OSError:
            pass

    except OSError as e:
      raise IOError("Unable to list key %s: %s" % (self.key_name, e))
List the names of all keys and values.
List the names of all keys and values.
List the names of all keys and values .
def ListNames(self):
    if not self.IsDirectory():
      return
    if self.hive is None:
      for name in dir(_winreg):
        if name.startswith("HKEY_"):
          yield name
      return
    try:
      with OpenKey(self.hive, self.local_path) as key:
        (self.number_of_keys, self.number_of_values,
         self.last_modified) = QueryInfoKey(key)
        for i in range(self.number_of_keys):
          try:
            yield EnumKey(key, i)
          except OSError:
            pass
        for i in range(self.number_of_values):
          try:
            name, unused_value, unused_value_type = EnumValue(key, i)
            yield name
          except OSError:
            pass
    except OSError as e:
      raise IOError("Unable to list key %s: %s" % (self.key_name, e))
def ListNames ( self ) : if not self . IsDirectory ( ) : return if self . hive is None : for name in dir ( _winreg ) : if name . startswith ( "HKEY_" ) : yield name return try : with OpenKey ( self . hive , self . local_path ) as key : ( self . number_of_keys , self . number_of_values , self . last_modified ) = QueryInfoKey ( key ) for i in range ( self . number_of_keys ) : try : yield EnumKey ( key , i ) except OSError : pass for i in range ( self . number_of_values ) : try : name , unused_value , unused_value_type = EnumValue ( key , i ) yield name except OSError : pass except OSError as e : raise IOError ( "Unable to list key %s: %s" % ( self . key_name , e ) )
List the names of all keys and values.
List the names of all keys and values .
"""List the names of all keys and values.""" # Handle the special case where no hive is specified and just list the hives # First keys # Now Values
self