![]() Server : Apache/2.4.52 (Ubuntu) System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64 User : www-data ( 33) PHP Version : 8.1.2-1ubuntu2.21 Disable Function : NONE Directory : /lib/python3/dist-packages/twisted/conch/ssh/__pycache__/ |
o �b� � @ s� d Z ddlZddlmZ ddlmZ ddlmZ g d�Zdd� Z dd d�Z dd � Zddd�Zdd� Z eedddd��dd� �ZdS )z@ Common functions for the SSH classes. Maintainer: Paul Swartz � N)�int_to_bytes)� deprecated)�Version)�NS�getNS�MP�getMP�ffsc C s( t | t�r | �d�} t�dt| ��| S )z net string zutf-8�!L)� isinstance�str�encode�struct�pack�len)�t� r �:/usr/lib/python3/dist-packages/twisted/conch/ssh/common.pyr s r � c C sp g }d}t |�D ]$}t�d| ||d � �\}|�| |d d| | � � |d| 7 }qt|�| |d� f S )z get net string r r � N)�ranger �unpack�append�tuple)�s�count�ns�c�i�lr r r r s r c C sP | dkrdS | dksJ �t | �}t|dd� �d@ rd| }t�dt|��| S )Nr s r � � �>L)r �ordr r r )�number�bnr r r r , s r c C sx g }d}t |�D ](}t�d| ||d � �\}|�t�| |d |d | � d�� |d| 7 }qt|�| |d� f S )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. r r"