Files
ServerSync/lib/paramiko/__pycache__/message.cpython-314.pyc

134 lines
12 KiB
Plaintext
Raw Normal View History

2026-02-12 02:28:23 +02:00
+
u<10>i<EFBFBD>$<00><00>^<00>Rt^RIt^RIHt^RIHt^RIHtHtH t ^RI
H t !RR4t R#)z&
Implementation of an SSH2 "message".
N)<01>BytesIO)<01>util)<03> zero_byte<74>max_byte<74>one_byte)<01>uc<00><>a<00>]tRt^toRtRtR"RltRtRtRt Rt
R t R
t R t R tR tRtRtRtRtRtRtRtRtRtRtRtRtRtRtRtRtRt Rt!R t"R!t#Vt$R#)#<23>Messageab
An SSH2 message is a stream of bytes that encodes some combination of
strings, integers, bools, and infinite-precision integers. This class
builds or breaks down such a byte stream.
Normally you don't need to deal with anything this low-level, but it's
exposed for people implementing custom extensions, or features that
paramiko doesn't support yet.
l~Nc <0C>P<00>Ve\V4VnR#\4VnR#)z<>
Create a new SSH2 message.
:param bytes content:
the byte stream to use as the message content (passed in only when
decomposing a message).
N)r<00>packet)<02>self<6C>contents&&<26>7/tmp/pip-target-zhdecbcm/lib/python/paramiko/message.py<70>__init__<5F>Message.__init__,s<00><00> <13> <1E>!<21>'<27>*<2A>D<EFBFBD>K<EFBFBD>!<21>)<29>D<EFBFBD>K<EFBFBD>c<08>"<00>VP4#<00>N)<01>asbytes<65>r s&r<00> __bytes__<5F>Message.__bytes__9s<00><00><13>|<7C>|<7C>~<7E>rc <0C>d<00>R\VPP44,R,#)z@
Returns a string representation of this object, for debugging.
zparamiko.Message(<28>))<03>reprr <00>getvaluers&r<00>__repr__<5F>Message.__repr__<s&<00><00>#<23>T<EFBFBD>$<24>+<2B>+<2B>*><3E>*><3E>*@<40>%A<>A<>C<EFBFBD>G<>Grc <0C>6<00>VPP4#)z?
Return the byte stream content of this Message, as a `bytes`.
)r rrs&rr<00>Message.asbytesCs<00><00><14>{<7B>{<7B>#<23>#<23>%<25>%rc <0C><<00>VPP^4R#)zS
Rewind the message to the beginning as if no items had been parsed
out of it yet.
N)r <00>seekrs&r<00>rewind<6E>Message.rewindIs<00><00>
<0A> <0B> <0B><18><18><11>rc <0C><><00>VPP4pVPP4pVPPV4V#)zS
Return the `bytes` of this message that haven't already been parsed and
returned.
)r <00>tell<6C>readr!)r <00>position<6F> remainders& r<00> get_remainder<65>Message.get_remainderPs@<00><00>
<18>;<3B>;<3B>#<23>#<23>%<25><08><18>K<EFBFBD>K<EFBFBD>$<24>$<24>&<26> <09> <0C> <0B> <0B><18><18><18>"<22><18>rc <0C><><00>VPP4pVP4VPPV4#)z<>
Returns the `bytes` of this message that have been parsed and
returned. The string passed into a message's constructor can be
regenerated by concatenating ``get_so_far`` and `get_remainder`.
)r r%r"r&)r r's& r<00>
get_so_far<EFBFBD>Message.get_so_farZs4<00><00> <18>;<3B>;<3B>#<23>#<23>%<25><08> <0C> <0B> <0B> <0A><13>{<7B>{<7B><1F><1F><08>)<29>)rc <0C><><00>VPPV4pRp\V4Tu;8dV8d)MV#V\V\V4,
,,#V#)z<>
Return the next ``n`` bytes of the message, without decomposing into an
int, decoded string, etc. Just the raw bytes are returned. Returns a
string of ``n`` zero bytes if there weren't ``n`` bytes remaining in
the message.
i)r r&<00>lenr)r <00>n<>b<> max_pad_sizes&& r<00> get_bytes<65>Message.get_bytesdsR<00><00> <11>K<EFBFBD>K<EFBFBD> <1C> <1C>Q<EFBFBD> <1F><01><1E> <0C> <0E>q<EFBFBD>6<EFBFBD>A<EFBFBD> $<24> <0C> $<24><10><08><15>y<EFBFBD>A<EFBFBD><03>A<EFBFBD><06>J<EFBFBD>/<2F>/<2F> /<2F><10>rc <0C>$<00>VP^4#)z<>
Return the next byte of the message, without decomposing it. This
is equivalent to `get_bytes(1) <get_bytes>`.
:return:
the next (`bytes`) byte of the message, or ``b''`` if there
aren't any bytes remaining.
)r3rs&r<00>get_byte<74>Message.get_byteqs<00><00><14>~<7E>~<7E>a<EFBFBD> <20> rc <0C>6<00>VP^4pV\8g#)z"
Fetch a boolean from the stream.
)r3r<00>r r1s& r<00> get_boolean<61>Message.get_boolean|s<00><00> <11>N<EFBFBD>N<EFBFBD>1<EFBFBD> <1D><01><10>I<EFBFBD>~<7E>rc <0C><><00>VP^4pV\8Xd%\P!VP 44#WP^4, p\
P !RV4^,#)zB
Fetch an int from the stream.
:return: a 32-bit unsigned `int`.
<EFBFBD>>I)r3rr<00> inflate_long<6E>
get_binary<EFBFBD>struct<63>unpack)r <00>bytes& r<00>get_adaptive_int<6E>Message.get_adaptive_int<6E>sY<00><00> <14>~<7E>~<7E>a<EFBFBD> <20><04> <0F>8<EFBFBD> <1B><17>$<24>$<24>T<EFBFBD>_<EFBFBD>_<EFBFBD>%6<>7<> 7<> <0C><0E><0E>q<EFBFBD>!<21>!<21><04><15>}<7D>}<7D>T<EFBFBD>4<EFBFBD>(<28><11>+<2B>+rc <0C>\<00>\P!RVP^44^,#)z
Fetch an int from the stream.
r=<00>r@rAr3rs&r<00>get_int<6E>Message.get_int<6E>s#<00><00><16>}<7D>}<7D>T<EFBFBD>4<EFBFBD>><3E>><3E>!<21>#4<>5<>a<EFBFBD>8<>8rc <0C>\<00>\P!RVP^44^,#)zR
Fetch a 64-bit int from the stream.
:return: a 64-bit unsigned integer (`int`).
<EFBFBD>>QrFrs&r<00> get_int64<36>Message.get_int64<36>s#<00><00> <16>}<7D>}<7D>T<EFBFBD>4<EFBFBD>><3E>><3E>!<21>#4<>5<>a<EFBFBD>8<>8rc <0C>J<00>\P!VP44#)zZ
Fetch a long int (mpint) from the stream.
:return: an arbitrary-length integer (`int`).
)rr>r?rs&r<00> get_mpint<6E>Message.get_mpint<6E>s<00><00> <14> <20> <20><14><1F><1F>!2<>3<>3rc <0C>@<00>VPVP44#)z<>
Fetch a "string" from the stream. This will actually be a `bytes`
object, and may contain unprintable characters. (It's not unheard of
for a string to contain another byte-stream message.)
<EFBFBD>r3rGrs&r<00>
get_string<EFBFBD>Message.get_string<6E>s<00><00> <14>~<7E>~<7E>d<EFBFBD>l<EFBFBD>l<EFBFBD>n<EFBFBD>-<2D>-rc <0C>4<00>\VP44#)zz
Fetch a Unicode string from the stream.
This currently operates by attempting to encode the next "string" as
``utf-8``.
)rrRrs&r<00>get_text<78>Message.get_text<78>s<00><00><11><14><1F><1F>"<22>#<23>#rc <0C>@<00>VPVP44#)z0
Alias for `get_string` (obtains a bytestring).
rQrs&rr?<00>Message.get_binary<72>s<00><00><14>~<7E>~<7E>d<EFBFBD>l<EFBFBD>l<EFBFBD>n<EFBFBD>-<2D>-rc <0C>@<00>VP4PR4#)zv
Fetch a list of `strings <str>` from the stream.
These are trivially encoded as comma-separated values in a string.
<EFBFBD>,)rU<00>splitrs&r<00>get_list<73>Message.get_list<73>s<00><00> <14>}<7D>}<7D><EFBFBD>$<24>$<24>S<EFBFBD>)<29>)rc <0C><<00>VPPV4V#)zR
Write bytes to the stream, without any formatting.
:param bytes b: bytes to add
<EFBFBD>r <00>writer9s&&r<00> add_bytes<65>Message.add_bytes<65><00><00><00> <0A> <0B> <0B><19><19>!<21><1C><13> rc <0C><<00>VPPV4V#)zY
Write a single byte to the stream, without any formatting.
:param bytes b: byte to add
r_r9s&&r<00>add_byte<74>Message.add_byte<74>rcrc <0C><><00>V'd"VPP\4V#VPP\4V#)zI
Add a boolean value to the stream.
:param bool b: boolean value to add
)r r`rrr9s&&r<00> add_boolean<61>Message.add_boolean<61>s9<00><00> <0A> <10>K<EFBFBD>K<EFBFBD> <1D> <1D>h<EFBFBD> '<27><14> <0B> <11>K<EFBFBD>K<EFBFBD> <1D> <1D>i<EFBFBD> (<28><13> rc <0C>f<00>VPP\P!RV44V#<00>z=
Add an integer to the stream.
:param int n: integer to add
r=<00>r r`r@<00>pack<63>r r0s&&r<00>add_int<6E>Message.add_int<6E><00>&<00><00> <0A> <0B> <0B><19><19>&<26>+<2B>+<2B>d<EFBFBD>A<EFBFBD>.<2E>/<2F><13> rc <0C><00>V\P8<>dGVPP\4VP \ P!V44V#VPP\P!RV44V#rk)
r <00>big_intr r`r<00>
add_stringr<00> deflate_longr@rmrns&&r<00>add_adaptive_int<6E>Message.add_adaptive_int<6E>sd<00><00> <0A><07><0F><0F> <1F> <10>K<EFBFBD>K<EFBFBD> <1D> <1D>h<EFBFBD> '<27> <10>O<EFBFBD>O<EFBFBD>D<EFBFBD>-<2D>-<2D>a<EFBFBD>0<> 1<><14> <0B> <11>K<EFBFBD>K<EFBFBD> <1D> <1D>f<EFBFBD>k<EFBFBD>k<EFBFBD>$<24><01>2<> 3<><13> rc <0C>f<00>VPP\P!RV44V#)z@
Add a 64-bit int to the stream.
:param int n: long int to add
rJrlrns&&r<00> add_int64<36>Message.add_int64<36>rqrc <0C>P<00>VP\P!V44V#)z<>
Add a long int to the stream, encoded as an infinite-precision
integer. This method only works on positive numbers.
:param int z: long int to add
)rtrru)r <00>zs&&r<00> add_mpint<6E>Message.add_mpints <00><00> <0A><0F><0F><04>)<29>)<29>!<21>,<2C>-<2D><13> rc <0C><><00>\P!V4pVP\V44VPP V4V#)zC
Add a bytestring to the stream.
:param byte s: bytestring to add
)rrror/r r`)r <00>ss&&rrt<00>Message.add_strings8<00><00> <11>L<EFBFBD>L<EFBFBD><11>O<EFBFBD><01> <0C> <0C> <0C>S<EFBFBD><11>V<EFBFBD><1C> <0C> <0B> <0B><19><19>!<21><1C><13> rc <0C>F<00>VPRPV44V#)z<>
Add a list of strings to the stream. They are encoded identically to
a single string of values separated by commas. (Yes, really, that's
how SSH2 does it.)
:param l: list of strings to add
rZ)rt<00>join)r <00>ls&&r<00>add_list<73>Message.add_lists<00><00> <0A><0F><0F><03><08><08><11> <0B>$<24><13> rc<08><00>\V4\JdVPV4#\V\4'dVP V4#\V4\ JdVPV4#VPV4#r) <09>type<70>boolrh<00>
isinstance<EFBFBD>intrv<00>listr<74>rt)r <00>is&&r<00>_add<64> Message._add'se<00><00> <0F><01>7<EFBFBD>d<EFBFBD>?<3F><17>#<23>#<23>A<EFBFBD>&<26> &<26> <17><01>3<EFBFBD> <1F> <1F><17>(<28>(<28><11>+<2B> +<2B> <11>!<21>W<EFBFBD><04>_<EFBFBD><17>=<3D>=<3D><11>#<23> #<23><17>?<3F>?<3F>1<EFBFBD>%<25> %rc <0C>:<00>VFpVPV4K R#)z<>
Add a sequence of items to the stream. The values are encoded based
on their type: bytes, str, int, bool, or list.
.. warning::
Longs are encoded non-deterministically. Don't use this method.
:param seq: the sequence of items
N)r<>)r <00>seq<65>items&* r<00>add<64> Message.add3s<00><00><18>D<EFBFBD> <10>I<EFBFBD>I<EFBFBD>d<EFBFBD>O<EFBFBD>r)r r)%<25>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__<5F>__doc__rsrrrrr"r)r,r3r6r:rCrGrKrNrRrUr?r\rarerhrorvryr}rtr<>r<>r<><00>__static_attributes__<5F>__classdictcell__)<01> __classdict__s@rr r s<><00><><00><00><08><19>G<EFBFBD> $<24><1E>H<01>&<26> <1C><19>*<2A> <11> !<21><1E>
,<2C>9<> 9<>4<>.<2E>$<24>.<2E> *<2A><14><14>
<14><14> <14><14><14> <14> <14>&<26> <1C> rr ) r<>r@<00>ior<00>paramikor<00>paramiko.commonrrr<00> paramiko.utilrr <00>rr<00><module>r<>s*<00><01>&<04><0E><16><19>9<>9<><1B>_<1C>_r