%PDF- %PDF-
Direktori : /lib/python3/dist-packages/paramiko/__pycache__/ |
Current File : //lib/python3/dist-packages/paramiko/__pycache__/kex_group1.cpython-312.pyc |
� �ec� � � � d Z ddlZddlmZ ddlmZ ddlmZmZ ddl m Z ddlmZm Z mZ ddlmZ ed d � \ ZZ ed d � D � cg c] } e| � �� c} \ ZZ ed� edz z Zed z Z G d� de� Zyc c} w )z� Standard SSH key exchange ("kex" if you wanna sound cool). Diffie-Hellman of 1024 bit key halves, using a known "p" prime and "g" generator. � N)�sha1)�util)�max_byte� zero_byte)�Message)�byte_chr�long� byte_mask)�SSHException� � � � � c �@ � e Zd ZdZdZdZeZd� Zd� Z d� Z d� Zd� Zd � Z y )� KexGroup1lE ����8�{3If?�E y�Z�3�V�58n�oP�e�?a-� �tBL� �y3W[�<�p�6m5��P��&a�F!�33*�w& �AR�M;L}.�c|&A�@�h\�&&#-D�v�d���� � zdiffie-hellman-group1-sha1c �r � || _ t d� | _ t d� | _ t d� | _ y )Nr )� transportr �x�e�f)�selfr s �5/usr/lib/python3/dist-packages/paramiko/kex_group1.py�__init__zKexGroup1.__init__2 s* � �"����a�����a�����a���� c �8 � | j � | j j rPt | j | j | j � | _ | j j t � y t | j | j | j � | _ t � }|j t � |j | j � | j j |� | j j t � y )N)�_generate_xr �server_mode�pow�Gr �Pr �_expect_packet�_MSG_KEXDH_INITr r �add_byte�c_MSG_KEXDH_INIT� add_mpint� _send_message�_MSG_KEXDH_REPLY)r �ms r � start_kexzKexGroup1.start_kex8 s� � ������>�>�%�%�����������0�D�F��N�N�)�)�/�:���T�V�V�T�V�V�T�V�V�,����I�� � � �#�$� ���D�F�F�����$�$�Q�'����%�%�&6�7r c � � | j j r|t k( r| j |� S | j j s|t k( r| j |� S d}t |j |� � �)Nz*KexGroup1 asked to handle packet type {:d})r r r$ �_parse_kexdh_initr) �_parse_kexdh_replyr �format)r �ptyper* �msgs r � parse_nextzKexGroup1.parse_nextG sf � ��>�>�%�%�5�O�+C��)�)�!�,�,����+�+��:J�1J��*�*�1�-�-�:���3�:�:�e�,�-�-r c �� � t j d� }t |d d� |dd z }|d d t k7 r |d d t k7 rn�Dt j |� | _ y )N� � r r r )�os�urandomr �b7fffffffffffffff�b0000000000000000r �inflate_longr )r �x_bytess r r zKexGroup1._generate_xQ si � � ��j�j��o�G���� �D�1�G�A�B�K�?�G�����0�0��B�Q�K�#4�4�� � �"�"�7�+��r c � � |j � }|j � | _ | j dk s| j | j dz kD rt d� �|j � }t | j | j | j � }t � }|j | j j | j j | j j | j j � |j |� |j! | j"