https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /proc/self/root/usr/lib/python2.7/site-packages/paramiko/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/lib/python2.7/site-packages/paramiko/config.pyc
�
x�\c@sxdZddlZddlZddlZddlZddlZdZdefd��YZdefd��YZ	dS(s2
Configuration file (aka ``ssh_config``) support.
i����Nit	SSHConfigcBs\eZdZejd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd�ZRS(	s�
    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
    s(\w+)(?:\s*=\s*|\s+)(.+)cCs
g|_dS(s5
        Create a new OpenSSH config object.
        N(t_config(tself((s3/tmp/pip-install-A1qMVe/paramiko/paramiko/config.pyt__init__.scCs�idgd6id6}x�|D]�}|j�}|s|jd�rLqntj|j|�}|stdj|���n|jd�j�}|jd�}|dkr�|j	j
|�i|j|�d6id6}q|dkr|j�d	krd|d|<q|jd
�r<|j
d
�r<|dd!}n|dkr�||dkrp|d|j
|�q�|g|d|<q||dkr||d|<qqW|j	j
|�dS(s�
        Read an OpenSSH config from the given file object.

        :param file_obj: a file-like object to read the config file from
        t*thosttconfigt#sUnparsable line {}iitproxycommandtnonet"i����tidentityfiletlocalforwardt
remoteforwardN(RRR
(tstript
startswithtretmatchtSETTINGS_REGEXt	ExceptiontformattgrouptlowerRtappendt
_get_hoststNonetendswith(Rtfile_objRtlineRtkeytvalue((s3/tmp/pip-install-A1qMVe/paramiko/paramiko/config.pytparse4s0
 cCs�g|jD]"}|j|d|�r
|^q
}i}x{|D]s}xj|dj�D]X\}}||kr�|dk	r�|n|||<qV|dkrV||j|�qVqVWq?W|j||�}d|kr�|ddkr�|d=n|S(s�
        Return a dict of config options for a given hostname.

        The host-matching rules of OpenSSH's ``ssh_config`` man page are used:
        For each parameter, the first obtained value will be used.  The
        configuration files contain sections separated by ``Host``
        specifications, and that section is only applied for hosts that match
        one of the patterns given in the specification.

        Since the first obtained value for each parameter is used, more host-
        specific declarations should be given near the beginning of the file,
        and general defaults at the end.

        The keys in the returned dict are all normalized to lowercase (look for
        ``"port"``, not ``"Port"``. The values are processed according to the
        rules for substitution variable expansion in ``ssh_config``.

        :param str hostname: the hostname to lookup
        RRRRN(Rt_allowedtitemsRtextendt_expand_variables(RthostnameRtmatchestretRRR((s3/tmp/pip-install-A1qMVe/paramiko/paramiko/config.pytlookup`s
"
 
cCs2t�}x"|jD]}|j|d�qW|S(s�
        Return the set of literal hostnames defined in the SSH config (both
        explicit hostnames and wildcard entries).
        R(tsetRtupdate(Rthoststentry((s3/tmp/pip-install-A1qMVe/paramiko/paramiko/config.pyt
get_hostnames�s	cCs_t}xR|D]J}|jd�r<tj||d�r<tStj||�r
t}q
q
W|S(Nt!i(tFalseRtfnmatchtTrue(RR*R$RR((s3/tmp/pip-install-A1qMVe/paramiko/paramiko/config.pyR �s
%
c	Csxd|kr)|djd|�|d<n
||d<d|krL|d}nt}tjd�}d|krz|d}n|}tj�jd�d}t||�}tjj	d�}id|dfd	|fd
|fd|fd|fd
|fd|fgd6d|fd|fd|dfd	|fd|fd
|fgd6d|fd|dfd|fd
|fgd6}	x�|D]�}
||
dkr�q�n|
|	kr�x�|	|
D]�\}}t||
t�r6x�t
t||
��D]E}
|||
|
kr�||
|
j|t|��||
|
<q�q�Wq�|||
kr�||
j|t|��||
<q�q�Wq�q�W|S(sC
        Return a dict of config options with expanded substitutions
        for a given hostname.

        Please refer to man ``ssh_config`` for the parameters that
        are replaced.

        :param dict config: the config for the hostname
        :param str hostname: the hostname that the config belongs to
        R$s%htporttUSERtusert.it~s%ls%Ls%ns%ps%rs%utcontrolpaths%dRRN(treplacetSSH_PORTtostgetenvtsockettgethostnametsplittLazyFqdntpatht
expanduserRt
isinstancetlisttrangetlentstr(RRR$R1R3t
remoteuserRtfqdnthomedirtreplacementstktfindR7titem((s3/tmp/pip-install-A1qMVe/paramiko/paramiko/config.pyR#�sX



							
			
	
$.cCs>ytj|�SWn&tk
r9tdj|���nXdS(s>
        Return a list of host_names from host value.
        sUnparsable host {}N(tshlexR=t
ValueErrorRR(RR((s3/tmp/pip-install-A1qMVe/paramiko/paramiko/config.pyR�s
(
t__name__t
__module__t__doc__RtcompileRRRR'R,R R#R(((s3/tmp/pip-install-A1qMVe/paramiko/paramiko/config.pyR!s			,	+	
			IR>cBs#eZdZdd�Zd�ZRS(s7
    Returns the host's fqdn on request as string.
    cCsd|_||_||_dS(N(RRGRR(RRR((s3/tmp/pip-install-A1qMVe/paramiko/paramiko/config.pyR�s		cCs|jdkrd}|jjdd�j�}|dkr�y�tj}|dkr^tjntj|j	d|tj
tjtj�}x?|D]7}|\}}}}	}
|	r�d|	kr�|	}Pq�q�WWq�tj
k
r�q�Xn|dkrtj�}n||_n|jS(Nt
addressfamilytanytinetR4(RGRRtgetRR;tAF_INET6tAF_INETtgetaddrinfoRt
SOCK_DGRAMt
IPPROTO_IPtAI_CANONNAMEtgaierrortgetfqdn(RRGtaddress_familytfamilytresultstrestaftsocktypetprotot	canonnametsa((s3/tmp/pip-install-A1qMVe/paramiko/paramiko/config.pyt__str__�s4	

N(RORPRQRRRh(((s3/tmp/pip-install-A1qMVe/paramiko/paramiko/config.pyR>�s(
RQR/R9RRMR;R8tobjectRR>(((s3/tmp/pip-install-A1qMVe/paramiko/paramiko/config.pyt<module>s�

https://t.me/AnonymousX5 - 2025