%PDF- %PDF-
Mini Shell

Mini Shell

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

�

�ec��d�ddlmZmZddlmZmZmZmZddlm	Z	Gd�de
�ZGd�de�Z
y)�)�max_byte�	zero_byte)�b�byte_ord�byte_chr�longNc��eZdZy)�BERExceptionN)�__name__�
__module__�__qualname__���./usr/lib/python3/dist-packages/paramiko/ber.pyr
r
s��rr
c�n�eZdZdZe�fd�Zd�Zd�Zd�Zd�Z	d�Z
ed��Zd	�Z
d
�Zed��Zy)
�BERz7
    Robey's tiny little attempt at a BER decoder.
    c�2�t|�|_d|_y)Nr)r�content�idx)�selfrs  r�__init__zBER.__init__!s����z�����rc��|jS�N)r�rs r�asbyteszBER.asbytes%s���|�|�rc�"�|j�Sr)rrs r�__str__zBER.__str__(s���|�|�~�rc�8�dt|j�zdzS)NzBER('z'))�reprrrs r�__repr__zBER.__repr__+s����d�l�l�+�+�d�2�2rc�"�|j�Sr)�decode_nextrs r�decodez
BER.decode.s�����!�!rc���|jt|j�k\ryt|j|j�}|xjdz
c_|dzdk(r�d}|jt|j�krkt|j|j�}|xjdz
c_|dz|dzz}|dzsn#|jt|j�kr�k|jt|j�k\ryt|j|j�}|xjdz
c_|dzrz|dz}|j|zt|j�kDryt	j
|j|j|j|zd�}|xj|z
c_|j|zt|j�kDry|j|j|j|z}|xj|z
c_|dk(r|j
|�S|d	k(rt	j
|�Sd
}t|j|���)N��r���T�0�z.Unknown ber encoding type {:d} (robey is lazy))	r�lenrr�util�inflate_long�decode_sequencer
�format)r�ident�t�size�data�msgs      rr"zBER.decode_next1s����8�8�s�4�<�<�(�(������d�h�h�/�0�����A�
���B�J�2���E��(�(�S����.�.��T�\�\�$�(�(�3�4�����A�
���!���D��1���D����(�(�S����.�.��8�8�s�4�<�<�(�(������T�X�X�.�/�����A�
���$�;��t��A��x�x�!�|�c�$�,�,�/�/���$�$����T�X�X����1��5�t��D�
�H�H��M�H��8�8�d�?�S����.�.���|�|�D�H�H�t�x�x�$��7�����D����D�=��'�'��-�-�
�a�Z��$�$�T�*�*�C�C��s�z�z�%�0�1�1rc�l�g}t|�}	|j�}|�	|S|j|��'r)rr"�append)r4�out�ber�xs    rr/zBER.decode_sequence_s>�����$�i������!�A��y���
�
�J�J�q�M�	rc�l�|xjt|�z
c_t|�dkDrLtjt|��}|xjtdt|�z�|zz
c_n'|xjtt|��z
c_|xj|z
c_y)Nr(r))rrr,r-�deflate_long)rr1�val�lenstrs    r�
encode_tlvzBER.encode_tlvjsy��������'���s�8�d�?��&�&�s�3�x�0�F��L�L�H�T�C��K�%7�8�6�A�A�L��L�L�H�S��X�.�.�L������rc�*�t|�tur0|r|jdt�y|jdt�yt|�t
ust|�tur&|jdtj|��yt|�tur|jd|�yt|�tust|�tur"|jd|j|��ytdjt|����)Nr%r+�r*zUnknown type for encoding: {!r})�type�boolr?rr�intrr-r<�str�list�tuple�encode_sequencer
r0)rr:s  r�encodez
BER.encodets�����7�d�?������8�,�����9�-��1�g��n�$�q�'�T�/��O�O�A�t�0�0��3�4�
�!�W��^��O�O�A�q�!��1�g��o�4��7�e�#3��O�O�D�$�"6�"6�q�"9�:��1�8�8��a��A��
rc�f�t�}|D]}|j|��|j�Sr)rrIr)r4r9�items   rrHzBER.encode_sequence�s0���e���	�D��J�J�t��	��{�{�}�rN)rrr
�__doc__�bytesrrrr r#r"�staticmethodr/r?rIrHrrrrrs_��� %�w����3�"�,2�\������"���rr)�paramiko.commonrr�paramiko.py3compatrrrr�
paramiko.utilr-�	Exceptionr
�objectrrrr�<module>rTs-��$0�:�:��	�9�	�n�&�nr

Zerion Mini Shell 1.0