%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/samba/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/samba/__pycache__/ms_display_specifiers.cpython-312.pyc

�

�I�d���&�ddlZd�Zejd�Zd�Zd�Zd�Zd�Zd�Ze	d	k(r#ddl
Z
	e
jd
Zeee��yy#e
$r9ede
jdze
j��e
j d
�Y�MwxYw)
�Nc��|}	|j�}|dddk(r|dk7r|dk7sJ�||z}n|dk(r|}|dk(r	||fS|}	||fS�C)z+Read a line from an LDIF file, unfolding itN�� ��
)�readline)�f�buffer�line�ls    �=/usr/lib/python3/dist-packages/samba/ms_display_specifiers.py�__read_folded_liners���D�
�
�J�J�L���R�a�5�C�<��2�:�$�$�,�/�.��!�8�D��r�z�����7��
�&�>������&�>��5�z^([A-Za-z][A-Za-z0-9-]*):c#�^K�d}	g}	t||�\}}|dddk(r�|dk(s|dk(rnktj|�}|r|dddk(r|dd}|j|�n4t	d|zdt
j�	�tjd���t|�r|��|dk(ry���w)
z(Read an LDIF entry, only unfolding linesrNr�#r���zInvalid line: %sr)�end�file)	r�attr_type_re�match�append�print�sys�stderr�exit�len)r	r
�entryr�ms     r
�__read_raw_entriesr>s������F�
����,�Q��7�K�Q����!�u��|���D�y�A��G���"�"�1�%�A���R�S�6�T�>��#�2��A����Q���(�1�,�#�C�J�J�G������%�(�u�:��K���7��7�s�B+B-c�v�|jd�dk7r$|jdd�}|jdd�S|S)z"Fix a string DN to use ${CONFIGDN}z%<Configuration NC Distinguished Name>rz
 rz${CONFIGDN})�find�replace)�dns r
�fix_dnr$as=��
�w�w�6�7�2�=�
�Z�Z��r�
"���z�z�A�=�Q�Q��	rc��g}|D]C}|ddk(r|j|d�d|d����(|j|d�d|d����Edj|�S)zWrite out entry as LDIF�r�: r�:: r)r�join)r�outrs   r
�__write_ldif_oner+kse��
�C�
�1���Q�4�1�9��J�J�1�Q�4��1��.�/�
�J�J�A�a�D�!�A�$�/�0�1��9�9�S�>�rc��g}|D]�}g}|jd�dk7r$|jdd�}|jd�n#|jdd�}|jd�|dj�}|dk(r�y|dk(r�|d	k(r��|d
k(r��|dk(r��|dk(r��|d
k(r5|dj	�j�j
�}|dk(r��t|d�|d<|j|���|}|S)z?Perform required transformations to the Microsoft-provided LDIFz::rr(rr'r�
changetype�distinguishedname�instancetype�name�cn�objectcategory�showinadvancedviewonly�TRUE)r!�splitr�lower�upper�lstrip�rstripr$)r�
temp_entryr�t�key�values      r
�__transform_entryr>ys���J�
�(�����6�6�$�<�2������q�!�A�
�H�H�Q�K�����a� �A�
�H�H�Q�K���d�j�j�l���,����%�%���.� ���&�=���$�;���"�"���*�*��a�D�J�J�L�'�'�)�0�0�2�E������a��d�|��!�����!��Q(�T
�E��Lrc	���g}ddlm}||dd��5}t|�D]%}|jt	t|����'	ddd�dj
|�dzS#1swY�xYw)z0Read and transform Microsoft-provided LDIF file.r)�open�rzlatin-1)�encodingNz

)�ior@rrr+r>r))�filenamer*r@r	rs     r
�read_ms_ldifrE�sw��
�C��	
�h��i�	0�C�A�'��*�	C�E��J�J�'�(9�%�(@�A�B�	C�C��;�;�s��f�$�$�	C�C�s�4A%�%A.�__main__rz*Usage: %s display-specifiers-ldif-file.txt)r)�rer�compilerrr$r+r>rE�__name__r�argv�display_specifiers_file�
IndexErrorrrr�rr
�<module>rNs���*
��F�r�z�z�5�6�� �F��1�h
%��z����"%�(�(�1�+��

�,�.�
/�0���
��
�:�c�h�h�q�k�J�QT�Q[�Q[�\��������s�A�;B�B

Zerion Mini Shell 1.0