|
Server : LiteSpeed System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : nandedex ( 1060) PHP Version : 8.1.33 Disable Function : NONE Directory : /opt/cppython/lib/python3.8/site-packages/paramiko/__pycache__/ |
U
P��g�j �
@ s� d Z ddlZddlZddlZddlZddlZddlZddlmZ ddl m
Z
ddlmZ d\Z
Zzddl
Z
W n& ek
r� Z zeZW 5 dZ[X Y nX ddlmZmZ d ZG d
d� d�Zdd
� ZG dd� d�ZG dd� de�ZdS )z2
Configuration file (aka ``ssh_config``) support.
� N)�sha1)�StringIO)�partial)NN� )�CouldNotCanonicalize�ConfigParseError� c @ s e Zd ZdZe�d�Zddddddd d
gdgdddddd
d gdddd gddd gdddddddd d
g d
�Zdd� Ze dd� �Z
e dd� �Ze dd� �Zdd� Z
dd� Zd2dd�Zdd� Zd d!� Zd"d#� Zd$d%� Zd&d'� Zd(d)� Zd*d+� Zd,d-� Zd.d/� Zd0d1� ZdS )3� SSHConfiga�
Representation of config information as stored in the format used by
OpenSSH. Queries can be made via `lookup`. The format is described in
OpenSSH's ``ssh_config`` man page. This class is provided primarily as a
convenience to posix users (since the OpenSSH format is a de-facto
standard on posix) but should work fine on Windows too.
.. versionadded:: 1.6
z(\w+)(?:\s*=\s*|\s+)(.+)�%C�%h�%l�%L�%n�%p�%r�%u�~�%d)Zcontrolpath�hostname�identityfile�proxycommandZ proxyjump�
match-execc C s
g | _ dS )a�
Create a new OpenSSH config object.
Note: the newer alternate constructors `from_path`, `from_file` and
`from_text` are simpler to use, as they parse on instantiation. For
example, instead of::
config = SSHConfig()
config.parse(open("some-path.config")
you could::
config = SSHConfig.from_file(open("some-path.config"))
# Or more directly:
config = SSHConfig.from_path("some-path.config")
# Or if you have arbitrary ssh_config text from some other source:
config = SSHConfig.from_text("Host foo\n\tUser bar")
N)�_config)�self� r �</opt/cppython/lib/python3.8/site-packages/paramiko/config.py�__init__H s zSSHConfig.__init__c C s | � t|��S )zg
Create a new, parsed `SSHConfig` from ``text`` string.
.. versionadded:: 2.7
)� from_filer )�cls�textr r r � from_text] s zSSHConfig.from_textc
C s* t |��}| �|�W 5 Q R � S Q R X dS )zr
Create a new, parsed `SSHConfig` from the file found at ``path``.
.. versionadded:: 2.7
N)�openr )r �path�flor r r � from_pathf s
zSSHConfig.from_pathc C s | � }|� |� |S )zp
Create a new, parsed `SSHConfig` from file-like object ``flo``.
.. versionadded:: 2.7
)�parse)r r# �objr r r r p s
zSSHConfig.from_filec C sR dgi d�}|D �].}|� � }|r|�d�r.qt�| j|�}|sNtd�|���|�d��� }|�d�}|dkr�| j �
|� di i}|d kr�| �|�|d <