from dosuby.src.factories.vulnerability_checker_factory import VulnerabilityCheckerFactory


class VulnerabilityCheckerManager:
    _instance = None
    
    @classmethod
    def get_instance(cls, name=None):
        if cls._instance is None:
            try:
                cls._instance = VulnerabilityCheckerFactory.create(name)
                # print(f"[+] Vulnerability Checker <{name}> Created")
            except Exception as e:
                print(f"Error creating vulnerability checker: {e}")
                return None
        return cls._instance