How to use the ciphey.iface._fwd.registry function in ciphey

To help you get started, weโ€™ve selected a few ciphey examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github brandonskerritt / Ciphey / ciphey / iface / _config.py View on Github external
def load_objs(self):
        # Basic type conversion
        if self.timeout is not None:
            self.objs["timeout"] = datetime.timedelta(seconds=int(self.timeout))
        self.objs["format"] = {
            key: pydoc.locate(value) for key, value in self.format.items()
        }

        # Checkers do not depend on anything
        self.objs["checker"] = self(_fwd.registry.get_named(self.checker, Checker))
        # Searchers only depend on checkers
        self.objs["searcher"] = self(_fwd.registry.get_named(self.searcher, Searcher))
github brandonskerritt / Ciphey / ciphey / iface / _config.py View on Github external
def update_param(self, owner: str, name: str, value: Optional[Any]):
        if value is None:
            return

        target = self.params.setdefault(owner, {})

        if _fwd.registry.get_named(owner).getParams()[name].list:
            target.setdefault(name, []).append(value)
        else:
            target[name] = value