OwlCyberSecurity - MANAGER
Edit File: domain_lib.cpython-311.opt-1.pyc
� �����h$�����������������������`�����d�dl�mZ�d�dlmZ�d�dlmZ��G�d��de������������Z�G�d��d������������ZdS�) �����)�cpapi)�FormattedException)�NotSupportedc�������������������������e�Zd�ZdS�)�DomainExceptionN)�__name__� __module__�__qualname__��������py/cllimits/domain_lib.pyr���r������s���������������Dr���r���c�������������������� �����e�Zd�Zd��Zd��Zd��ZdS�)�Domainc�����������������������d�|�_���������d�S�)N)�_userdomain_cache)�selfs��� r ����__init__zDomain.__init__���s������!%����r���c������������������������|�j����������@ �t����������t����������j��������d�������������������������|�_���������n#�t����������$�r �i�|�_���������Y�nw�xY�w|�j������������������������������|d������������S�)z~ Retrive main domain for supplied user :param username: User name :return: Domain name or N/A N)�cplogin�dns)�keylszN/A)r����dictr����cpinfor����get)r����usernames��� r ����get_user_domainzDomain.get_user_domain���su��������!�)� ,�)-�e�l�AS�.T�.T�.T�)U�)U��&�&���� ,�� ,�� ,�)+��&�&�&� ,�����%�)�)�(�E�:�:�:s����'1��A�Ac������������������������ �t����������j��������|������������}|r|S�n@#�t����������t�����������j��������j��������f$�r"}t����������t ����������|������������������������|�d}~ww�xY�wt����������dd|id��������������)zn Retrive username by domain :param domain_name: Domain name :return: Username NzThere is no domain '%(domain)s'�domain)�message�context)r����domain_owner�IOError�cpapiexceptionsr���r����str)r����domain_namer����es��� r ����get_user_name_by_domainzDomain.get_user_name_by_domain$���s������� 1��)�+�6�6�H��� ��� ����.�;�<�� 1�� 1�� 1�!�#�a�&�&�)�)�q�0����� 1�����*K�+3�[�*A�C��C��D��D�� Ds������A�A�AN)r���r ���r ���r���r���r'���r���r���r ���r���r������sF��������������&��&��&�;��;��;� D�� D�� D�� D�� Dr���r���N)�clcommonr����clcommon.clexceptionr����clcommon.cpapir���r���r���r���r���r ����<module>r+������s�������������������3��3��3��3��3��3��'��'��'��'��'��'� �� �� �� �� �(�� �� �� �D��D��D��D��D��D��D��D��D��Dr���