HOME


Mini Shell 1.0
DIR: /usr/lib/python3/dist-packages/twisted/conch/ssh/__pycache__/
Upload File :
Current File : //usr/lib/python3/dist-packages/twisted/conch/ssh/__pycache__/common.cpython-312.pyc
�

Ϫ�f����dZddlZddlmZddlmZddlmZgd�Zd�Z	dd�Z
d	�Zdd
�Zd�Z
eedd
dd��d��Zy)z@
Common functions for the SSH classes.

Maintainer: Paul Swartz
�N)�int_to_bytes)�
deprecated)�Version)�NS�getNS�MP�getMP�ffsc��t|t�r|jd�}tjdt|��|zS)z
    net string
    zutf-8�!L)�
isinstance�str�encode�struct�pack�len)�ts �:/usr/lib/python3/dist-packages/twisted/conch/ssh/common.pyrrs6���!�S��
�H�H�W����;�;�t�S��V�$�q�(�(�c���g}d}t|�D]E}tjd|||dz�\}|j||dzd|z|z�|d|zz
}�Gt	|�||dfzS)z
    get net string
    rr�N)�ranger�unpack�append�tuple)�s�count�ns�c�i�ls      rrrs���
�B�	�A�
�5�\����}�}�T�1�Q��Q��<�0���
�	�	�!�A��E�A��E�A�I�&�'�	�Q��U�
�����9��!�"��x��rc��|dk(ry|dkDsJ�t|�}t|dd�dzrd|z}tjdt	|��|zS)Nrs����>L)r�ordrrr)�number�bns  rrr,sW��
��{���A�:��:�	�f�	�B�
�2�a��7�|�c��
�r�\���;�;�t�S��W�%��*�*rc	��g}d}t|�D]Y}tjd|||dz�\}|jtj||dz|dz|zd��|d|zz
}�[t
|�||dfzS)a=
    Get multiple precision integer out of the string.  A multiple precision
    integer is stored as a 4-byte length followed by length bytes of the
    integer.  If count is specified, get count integers out of the string.
    The return value is a tuple of count integers followed by the rest of
    the data.
    rr&r�bigN)rrrr�int�
from_bytesr)�datar�mprr �lengths      rr	r	6s���
�B�	�A�
�5�\����M�M�$��Q��Q���8�	��
�	�	�#�.�.��a�!�e�a�!�e�f�n�!=�u�E�F�	�Q��Z������9��Q�R��{�"�"rc�"�|D]
}||vs�|cSy)zs
    first from second
    goes through the first list, looking for items in the second, returns the first one
    N�)rrr s   rr
r
Gs��
�����6��H�r�Twisted��c��y)Nr2r2rr�installr7Qs��	r)r#)�__doc__r�cryptography.utilsr�twisted.python.deprecater�twisted.python.versionsr�__all__rrrr	r
r7r2rr�<module>r=sZ��
��+�/�+�
/��)�
 �+�#�"��G�I�r�1�a�(�)�	�*�	r