/usr/lib/python3/dist-packages/twisted/conch/ssh/__pycache__
Edit: /usr/lib/python3/dist-packages/twisted/conch/ssh/__pycache__/common.cpython-310.pyc (2292B)
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" r ÚbigN)r r r r ÚintÚ
from_bytesr )Údatar Úmpr r Úlengthr r r r 6 s &r c C s | D ]
}||v r| S qdS )zs
first from second
goes through the first list, looking for items in the second, returns the first one
Nr )r r r r r r r G s
ÿÿr ÚTwistedé é c C s d S )Nr r r r r ÚinstallQ s r/ )r )Ú__doc__r Úcryptography.utilsr Útwisted.python.deprecater Útwisted.python.versionsr Ú__all__r r r r r r/ r r r r Ú
s