%PDF- %PDF-
Direktori : /lib/python3/dist-packages/samba/netcmd/__pycache__/ |
Current File : //lib/python3/dist-packages/samba/netcmd/__pycache__/common.cpython-312.pyc |
� �I�d@ � � � d dl Z d dlmZ d dlmZ d dlmZ d dlZ ed� Z dd�Z d� Zdd�Zdd �Z d � Zd� Zd� Zd � Zd� Zy)� N)�nbt)�Net)�CommandErrorl���� c � � | }t j d| � }|r�|j d� }|j d� }|�C|j � }|j � |j � k7 rt d|� d|� d�� �|j � d|j � fS d}t j d| � }|r||j d� }|j d� }|�X|j � }|j d d� d }|j � |j � k7 rt d|� d|� d�� �|j � |j � dfS ) a get the realm or the domain and the base user from user like: * username * DOMAIN\username * username@REALM A SamDB object can also be passed in to check our domain or realm against the obtained ones. z (\w+)\\(\w+$)� � zGiven domain 'z' does not match our domain 'z'!� z(\w+)@(\w+)�.r z Given realm 'z' does not match our realm ') �re�match�group�domain_netbios_name�lowerr �upper�domain_dns_name�split) �user�sam�baseuser�m�domain� our_domain�realm� our_realm�our_realm_initials �5/usr/lib/python3/dist-packages/samba/netcmd/common.py�_get_user_realm_domainr sW � � �H� ���!�4�(�A���������7�7�1�:���?��0�0�2�J��|�|�~��!1�!1�!3�3�"�^�F�8� <2�2<��R�$A� B� B� ��� �"�f�l�l�n�5�5��E� �����&�A���7�7�1�:������ ���?��+�+�-�I� )����Q� 7�� :���{�{�}� 1� 7� 7� 9�9�"�]�5�'� :-�-6�K�r�$;� <� <� �N�N��e�k�k�m�R�0�0� c � � | j d� j � dz | j d� j � z S )zkreturn the full DNS name of our own host. Used as a default for hostname when running status queriesznetbios namer r )�getr )�lps r �netcmd_dnsnamer"