Search for registry keys and values
        
        :type searchterm: str
        :rtype: list
771459
def search_registry(self, searchterm):
        
        return self.__search(type_attribute=self.__mispregistrytypes(), value=searchterm)
43857
def _search(self, trie, strings, limit=None):
        
        results = [trie.has_keys_with_prefix(s) for s in strings]
        if not any(results):
            return []
        for result, s in zip(results, strings):
            if result is True:
                return trie.values(s)[:limit]
772331
def list():
        """"""
        handle = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE)
        tzkey = winreg.OpenKey(handle, TZKEYNAME)
        result = [winreg.EnumKey(tzkey, i)
                  for i in range(winreg.QueryInfoKey(tzkey)[0])]
        tzkey.Close()
        handle.Close()
        return result
229454
def find(self, search_term: str) -> List[Commodity]:
        
        query = (
            self.query
            .filter(Commodity.mnemonic.like('%' + search_term + '%') |
                    Commodity.fullname.like('%' + search_term + '%'))
        )
        return query.all()
492619
function SearchResultExplorer(registry, commandService) {
        this.registry = registry;
        this._commandService = commandService;
        this.fileClient = new mFileClient.FileClient(this.registry);
        this.defaulRows = 40;
		this._contentTypeService = new mContentTypes.ContentTypeRegistry(this.registry);
        this.declareCommands();
    }
301555
def parse_registries(filesystem, registries):
    
    results = {}

    for path in registries:
        with NamedTemporaryFile(buffering=0) as tempfile:
            filesystem.download(path, tempfile.name)

            registry = RegistryHive(tempfile.name)
            registry.rootkey = registry_root(path)

            results.update({k.path: (k.timestamp, k.values)
                            for k in registry.keys()})

    return results
1354605
def Match(self, registry_key):
    
    value_names = frozenset([
        registry_value.name for registry_value in registry_key.GetValues()])

    return self._value_names.issubset(value_names)
867801
def Match(self, registry_key):
    
    key_path = registry_key.path.upper()
    if self._key_path_prefix and self._key_path_suffix:
      if (key_path.startswith(self._key_path_prefix) and
          key_path.endswith(self._key_path_suffix)):

        key_path_segment = key_path[
            len(self._key_path_prefix):-len(self._key_path_suffix)]
        if key_path_segment.startswith('ControlSet'.upper()):
          try:
            control_set = int(key_path_segment[10:], 10)
          except ValueError:
            control_set = None

          # TODO: check if control_set is in bounds.
          return control_set is not None

    return key_path in (self._key_path_upper, self._wow64_key_path_upper)
693507
def find(value):
        
        value = str(value).lower()
        rtn_dict = RegistryDictionary()
        for attr in dir(MODULE.rdfclass):
            if value in attr.lower():
                try:
                    item = getattr(MODULE.rdfclass, attr)
                    if issubclass(item, RdfClassBase):
                        rtn_dict[attr] = item
                except TypeError:
                    pass
        return rtn_dict
124279
def get_kbr_keys(kb_name, searchkey="", searchvalue="", searchtype='s'):
    
    if searchtype == 's' and searchkey:
        searchkey = '%'+searchkey+'%'
    if searchtype == 's' and searchvalue:
        searchvalue = '%'+searchvalue+'%'
    if searchtype == 'sw' and searchvalue:  # startswith
        searchvalue = searchvalue+'%'
    if not searchvalue:
        searchvalue = '%'
    if not searchkey:
        searchkey = '%'

    query = db.session.query(models.KnwKBRVAL).join(models.KnwKB) \
        .filter(models.KnwKBRVAL.m_key.like(searchkey),
                models.KnwKBRVAL.m_value.like(searchvalue),
                models.KnwKB.name.like(kb_name))

    return [(k.m_key,) for k in query.all()]
987127
def _get_registry_names(self, registry):
        
        return ', '.join(
            f.__name__ if not isinstance(f, tuple) else f[0].__name__
            for f in getattr(self, registry, []))
298649
def quick_search(self, terms):
        ''''''
        assert type(terms) is str
        p = [{'quicksearch': terms}]
        return self.search_bugs(p)
726353
def find(self, value):
        
        value = str(value).lower()
        rtn_dict = RegistryDictionary()
        for key, item in self.items():
            if value in key.lower():
                rtn_dict[key] = item
        return rtn_dict
1184485
def _search(self):
        
        results = []
        for _id in self.doc_dict:
            entry = self.doc_dict[_id]
            if entry.doc is not None:
                results.append(entry.merged_dict)
        return results
897544
def _get_from_registry(self):
        
        from ._windows import reg_keys
        for location in reg_keys:
            location = location.replace('\\', '/')
            jreKey = "/proc/registry/HKEY_LOCAL_MACHINE/{}".format(location)
            try:
                with open(jreKey + "/CurrentVersion") as f:
                    cv = f.read().split('\x00')
                versionKey = jreKey + "/" + cv[0]

                with open(versionKey + "/RunTimeLib") as f:
                    cv = f.read().split('\x00')

                return cv[0]

            except OSError:
                pass
        return None
955784
def _ParseMRUListValue(self, registry_key):
    
    mrulist_value = registry_key.GetValueByName('MRUList')

    # The key exists but does not contain a value named "MRUList".
    if not mrulist_value:
      return None

    mrulist_entries_map = self._GetDataTypeMap('mrulist_entries')

    context = dtfabric_data_maps.DataTypeMapContext(values={
        'data_size': len(mrulist_value.data)})

    return self._ReadStructureFromByteStream(
        mrulist_value.data, 0, mrulist_entries_map, context=context)
267752
def GetSubkeys(self):
    
    if not self._registry_key and self._registry:
      self._GetKeyFromRegistry()

    return iter(self._subkeys.values())