AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 18.226.165.236
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python2.7/site-packages/ansible/plugins/connection/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyc
�
��\c@`sddlmZmZmZeZdZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlmZddlmZddlmZmZmZmZddlmZddlmZdd	lmZmZmZdd
lm Z ddl!m"Z"m#Z#m$Z$ddl%m&Z&m'Z'dd
l(m)Z)m*Z*ddl+m,Z,m-Z-yddl.m/Z/Wn*e0k
r�ddl1m2Z2e2�Z/nXddfZ3e4a5defd��YZ6e/d�Z7d�Z8de)fd��YZ9dS(i(tabsolute_importtdivisiontprint_functionsN&
    connection: ssh
    short_description: connect via ssh client binary
    description:
        - This connection plugin allows ansible to communicate to the target machines via normal ssh command line.
        - Ansible does not expose a channel to allow communication between the user and the ssh process to accept
          a password manually to decrypt an ssh key when using this connection plugin (which is the default). The
          use of ``ssh-agent`` is highly recommended.
    author: ansible (@core)
    version_added: historical
    options:
      host:
          description: Hostname/ip to connect to.
          default: inventory_hostname
          vars:
               - name: ansible_host
               - name: ansible_ssh_host
      host_key_checking:
          description: Determines if ssh should check host keys
          type: boolean
          ini:
              - section: defaults
                key: 'host_key_checking'
              - section: ssh_connection
                key: 'host_key_checking'
                version_added: '2.5'
          env:
              - name: ANSIBLE_HOST_KEY_CHECKING
              - name: ANSIBLE_SSH_HOST_KEY_CHECKING
                version_added: '2.5'
          vars:
              - name: ansible_host_key_checking
                version_added: '2.5'
              - name: ansible_ssh_host_key_checking
                version_added: '2.5'
      password:
          description: Authentication password for the C(remote_user). Can be supplied as CLI option.
          vars:
              - name: ansible_password
              - name: ansible_ssh_pass
      ssh_args:
          description: Arguments to pass to all ssh cli tools
          default: '-C -o ControlMaster=auto -o ControlPersist=60s'
          ini:
              - section: 'ssh_connection'
                key: 'ssh_args'
          env:
              - name: ANSIBLE_SSH_ARGS
          vars:
              - name: ansible_ssh_args
                version_added: '2.7'
      ssh_common_args:
          description: Common extra args for all ssh CLI tools
          ini:
              - section: 'ssh_connection'
                key: 'ssh_common_args'
                version_added: '2.7'
          env:
              - name: ANSIBLE_SSH_COMMON_ARGS
                version_added: '2.7'
          vars:
              - name: ansible_ssh_common_args
      ssh_executable:
          default: ssh
          description:
            - This defines the location of the ssh binary. It defaults to ``ssh`` which will use the first ssh binary available in $PATH.
            - This option is usually not required, it might be useful when access to system ssh is restricted,
              or when using ssh wrappers to connect to remote hosts.
          env: [{name: ANSIBLE_SSH_EXECUTABLE}]
          ini:
          - {key: ssh_executable, section: ssh_connection}
          #const: ANSIBLE_SSH_EXECUTABLE
          version_added: "2.2"
          vars:
              - name: ansible_ssh_executable
                version_added: '2.7'
      sftp_executable:
          default: sftp
          description:
            - This defines the location of the sftp binary. It defaults to ``sftp`` which will use the first binary available in $PATH.
          env: [{name: ANSIBLE_SFTP_EXECUTABLE}]
          ini:
          - {key: sftp_executable, section: ssh_connection}
          version_added: "2.6"
          vars:
              - name: ansible_sftp_executable
                version_added: '2.7'
      scp_executable:
          default: scp
          description:
            - This defines the location of the scp binary. It defaults to `scp` which will use the first binary available in $PATH.
          env: [{name: ANSIBLE_SCP_EXECUTABLE}]
          ini:
          - {key: scp_executable, section: ssh_connection}
          version_added: "2.6"
          vars:
              - name: ansible_scp_executable
                version_added: '2.7'
      scp_extra_args:
          description: Extra exclusive to the ``scp`` CLI
          vars:
              - name: ansible_scp_extra_args
          env:
            - name: ANSIBLE_SCP_EXTRA_ARGS
              version_added: '2.7'
          ini:
            - key: scp_extra_args
              section: ssh_connection
              version_added: '2.7'
      sftp_extra_args:
          description: Extra exclusive to the ``sftp`` CLI
          vars:
              - name: ansible_sftp_extra_args
          env:
            - name: ANSIBLE_SFTP_EXTRA_ARGS
              version_added: '2.7'
          ini:
            - key: sftp_extra_args
              section: ssh_connection
              version_added: '2.7'
      ssh_extra_args:
          description: Extra exclusive to the 'ssh' CLI
          vars:
              - name: ansible_ssh_extra_args
          env:
            - name: ANSIBLE_SSH_EXTRA_ARGS
              version_added: '2.7'
          ini:
            - key: ssh_extra_args
              section: ssh_connection
              version_added: '2.7'
      retries:
          # constant: ANSIBLE_SSH_RETRIES
          description: Number of attempts to connect.
          default: 3
          type: integer
          env:
            - name: ANSIBLE_SSH_RETRIES
          ini:
            - section: connection
              key: retries
            - section: ssh_connection
              key: retries
          vars:
            - name: ansible_ssh_retries
              version_added: '2.7'
      port:
          description: Remote port to connect to.
          type: int
          default: 22
          ini:
            - section: defaults
              key: remote_port
          env:
            - name: ANSIBLE_REMOTE_PORT
          vars:
            - name: ansible_port
            - name: ansible_ssh_port
      remote_user:
          description:
              - User name with which to login to the remote server, normally set by the remote_user keyword.
              - If no user is supplied, Ansible will let the ssh client binary choose the user as it normally
          ini:
            - section: defaults
              key: remote_user
          env:
            - name: ANSIBLE_REMOTE_USER
          vars:
            - name: ansible_user
            - name: ansible_ssh_user
      pipelining:
          default: ANSIBLE_PIPELINING
          description:
            - Pipelining reduces the number of SSH operations required to execute a module on the remote server,
              by executing many Ansible modules without actual file transfer.
            - This can result in a very significant performance improvement when enabled.
            - However this conflicts with privilege escalation (become).
              For example, when using sudo operations you must first disable 'requiretty' in the sudoers file for the target hosts,
              which is why this feature is disabled by default.
          env:
            - name: ANSIBLE_PIPELINING
            #- name: ANSIBLE_SSH_PIPELINING
          ini:
            - section: defaults
              key: pipelining
            #- section: ssh_connection
            #  key: pipelining
          type: boolean
          vars:
            - name: ansible_pipelining
            - name: ansible_ssh_pipelining
      private_key_file:
          description:
              - Path to private key file to use for authentication
          ini:
            - section: defaults
              key: private_key_file
          env:
            - name: ANSIBLE_PRIVATE_KEY_FILE
          vars:
            - name: ansible_private_key_file
            - name: ansible_ssh_private_key_file

      control_path:
        description:
          - This is the location to save ssh's ControlPath sockets, it uses ssh's variable substitution.
          - Since 2.3, if null, ansible will generate a unique hash. Use `%(directory)s` to indicate where to use the control dir path setting.
        env:
          - name: ANSIBLE_SSH_CONTROL_PATH
        ini:
          - key: control_path
            section: ssh_connection
        vars:
          - name: ansible_control_path
            version_added: '2.7'
      control_path_dir:
        default: ~/.ansible/cp
        description:
          - This sets the directory to use for ssh control path if the control path setting is null.
          - Also, provides the `%(directory)s` variable for the control path setting.
        env:
          - name: ANSIBLE_SSH_CONTROL_PATH_DIR
        ini:
          - section: ssh_connection
            key: control_path_dir
        vars:
          - name: ansible_control_path_dir
            version_added: '2.7'
      sftp_batch_mode:
        default: 'yes'
        description: 'TODO: write it'
        env: [{name: ANSIBLE_SFTP_BATCH_MODE}]
        ini:
        - {key: sftp_batch_mode, section: ssh_connection}
        type: bool
        vars:
          - name: ansible_sftp_batch_mode
            version_added: '2.7'
      scp_if_ssh:
        default: smart
        description:
          - "Prefered method to use when transfering files over ssh"
          - When set to smart, Ansible will try them until one succeeds or they all fail
          - If set to True, it will force 'scp', if False it will use 'sftp'
        env: [{name: ANSIBLE_SCP_IF_SSH}]
        ini:
        - {key: scp_if_ssh, section: ssh_connection}
        vars:
          - name: ansible_scp_if_ssh
            version_added: '2.7'
      use_tty:
        version_added: '2.5'
        default: 'yes'
        description: add -tt to ssh commands to force tty allocation
        env: [{name: ANSIBLE_SSH_USETTY}]
        ini:
        - {key: usetty, section: ssh_connection}
        type: bool
        vars:
          - name: ansible_ssh_use_tty
            version_added: '2.7'
N(twraps(t	constants(tAnsibleAuthenticationFailuretAnsibleConnectionFailuretAnsibleErrortAnsibleFileNotFound(tAnsibleOptionsError(t	selectors(tPY3t	text_typetbinary_type(tshlex_quote(tto_bytest	to_nativetto_text(tBOOLEANStboolean(tConnectionBasetBUFSIZE(tunfrackpatht
makedirs_safe(tdisplay(tDisplays"Traceback (most recent call last):sPHP Parse error:t$AnsibleControlPersistBrokenPipeErrorcB`seZdZRS(s ControlPersist broken pipe (t__name__t
__module__t__doc__(((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyR9sc	C`s�|dkr�|ddkr�dj|�}|dkr@d}n|rXdj|�}n"dj|t|dj���}t|��q�|ddkr�d
}|r�dj|�}q�dj|t|dj���}q�n|ddkrxt}x(tD] }||d	kr�t}Pq�q�W|rxd}|rDdj|�}n"dj|t|d�j��}t|��qxnd	|dko�dknr�d}|r�dj|�}n"dj|t|d�j��}|j|d|�ndS(Ntsshpassiis_Invalid/incorrect username/password. Skipping remaining {0} retries to prevent account lockout:sInvalid/incorrect password:s"{0} <error censored due to no log>s{0} {1}iiiiissshpass error:i�s&Failed to connect to the host via ssh:i�thost(iiiii(	tformatRtrstripRtTruetb_NOT_SSH_ERRORStFalseRtvvv(	tremaining_retriestcommandtreturn_tupletno_logRRtmsgt	SSH_ERRORt	signature((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyt
_handle_error>s@	"(
" "c`st���fd��}|S(s+
    Decorator to retry ssh/scp/sftp in the case of a connection failure

    Will retry if:
    * an exception is caught
    * ssh returns 255
    Will not retry if
    * sshpass returns 5 (invalid password, to prevent account lockouts)
    * remaining_tries is < 2
    * retries limit reached
    c`s�ttj�d}d|d}xqt|�D]c}|d}|dkr�|jjr�t|t�r�tj	�|_
dt|j
ddddd�|d<ny yY�|||�}|jjr�t
jd	|dd
|j�nt
j|d
|j�Wn�tk
r�|d}|jjrht|t�rhtj	�|_
dt|j
ddddd�|d<nt
jd��|||�}nX||d}t||d||jj|j�PWq.tk
r�}	�q.ttfk
r�}	||dkr�q�d|d}
|
d
kr$d
}
nt|	t�rMd|d||
f}nd|d|	||
f}t
j|d
|j�tj|
�q.q.Xq.W|S(Nis%s...is-dt	nonstringt
simplereprterrorstsurrogate_or_stricts/rc=%s, stdout and stderr censored due to no logRu.RETRYING BECAUSE OF CONTROLPERSIST BROKEN PIPEiisPssh_retry: attempt: %d, ssh return code is 255. cmd (%s), pausing for %d secondssRssh_retry: attempt: %d, caught exception(%s) from cmd (%s), pausing for %d seconds(tinttCtANSIBLE_SSH_RETRIEStranget
_play_contexttpasswordt
isinstancetlisttostpipetsshpass_pipeRR)RR%RRR-RRt	Exceptiontvvttimetsleep(tselftargstkwargstremaining_triestcmd_summarytattempttcmdR(R&tetpauseR*(tfunc(sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pytwrapped{sL
'*!

*
#	
(R(RJRK((RJsB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyt
_ssh_retryos=t
ConnectioncB`seZdZdZeZeej�j	dg�Z
d�Zd�Ze
eed��Ze
d��Ze
d��Zd�Zd	�Zd
�Ze
d��Zd�Zeed
�Zeeed��Zed��Zeed�Zd�Zd�Zd�Zd�ZRS(s ssh based connections tsshtrunascO`sbtt|�j||�|jj|_|jj|_|jj|_t	j
|_t	j|_
dS(N(tsuperRMt__init__R6tremote_addrRtporttremote_usertuserR3tANSIBLE_SSH_CONTROL_PATHtcontrol_pathtANSIBLE_SSH_CONTROL_PATH_DIRtcontrol_path_dir(RARBRC((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyRQ�scC`s|S(N((RA((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyt_connect�sc	C`s�d|||f}|r*|d|7}n|rG|dt|�7}ntj�}|jt|��|j�}d|d }|S(s7Make a hash for the controlpath based on con attributess%s-%s-%ss-%ss%(directory)s/i
(Rthashlibtsha1tupdateRt	hexdigest(	RRSRUt
connectiontpidtpstringtmtdigesttcpath((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyt_create_control_path�scC`sntdkrjyAtjdgdtjdtjdtj�}|j�taWqjtk
rftaqjXntS(NRtstdintstdouttstderr(	tSSHPASS_AVAILABLEtNonet
subprocesstPopentPIPEtcommunicateR"tOSErrorR$(tp((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyt_sshpass_available�s-



cC`s[t}t}xBd�|D�D]0}d|kr8t}qd|krt}qqW||fS(s
        Takes a command array and scans it for ControlPersist and ControlPath
        settings and returns two booleans indicating whether either was found.
        This could be smarter, e.g. returning false if ControlPersist is 'no',
        but for now we do it simple way.
        cs`s|]}|j�VqdS(N(tlower(t.0ta((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pys	<genexpr>�stcontrolpersisttcontrolpath(R$R"(t	b_commandRuRvtb_arg((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyt_persistence_controls�s		
cC`sDtjd|djd�|D��fd|jj�||7}dS(s�
        Adds arguments to the ssh command and displays a caller-supplied explanation of why.

        :arg b_command: A list containing the command to add the new arguments to.
            This list will be modified by this method.
        :arg b_args: An iterable of new arguments to add.  This iterable is used
            more than once so it must be persistent (ie: a list is okay but a
            StringIO would not)
        :arg explanation: A text string containing explaining why the arguments
            were added.  It will be displayed with a high enough verbosity.
        .. note:: This function does its work via side-effect.  The b_command list has the new arguments appended.
        u
SSH: %s: (%s)s)(cs`s|]}t|�VqdS(N(R(RsRt((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pys	<genexpr>sRN(RtvvvvvtjoinR6RR(RARwtb_argstexplanation((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyt	_add_argss
6cG`s�g}|jjrl|j�s-td��ntj�|_|ddt|jddddd�g7}n|d	kr�|t|jjdd�g7}n|t|dd�g7}|d
kr	t	j
r	|jjr�ddg}|j||d
�n|ddg7}n|jjdkr+|j
d�n|jjr�g|j|jj�D]}t|dd�^qM}|j||d�nt	js�d*}|j||d�n|jjd+k	r�ddt|jjdddd�f}|j||d�n|jj}|rJddttjj|�dd�df}|j||d�n|jjsl|j|d,d�n|jj}|r�|j|ddt|jjdd�fd�n|j|dd t|jjdddd�fd!�x�d"d#j|�fD]o}t|j|d+�}	|	d+k	r�g|j|	�D]}t|dd�^q2}|j||d$|�q�q�W|j|�\}
}|
rft|_|sft|j�}t|dd�}
t|
d%�tj |
tj!�s�td&t"|���n|j#s!|j$|j%|j|j&�|_#ndd't|j#t'd(|�dd�f}|j||d)�qfn|r�|g|D]}t|�^qv7}n|S(-s�
        Takes a binary (ssh, scp, sftp) and optional extra arguments and returns
        a command line as an array that can be passed to subprocess.Popen.
        sUto use the 'ssh' connection type with passwords, you must install the sshpass programRs-diR.R/R0R1RNtsftps-osBatchMode=noudisable batch mode for sshpasss-bt-is-vvvuansible.cfg set ssh_argssStrictHostKeyChecking=nou4ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabledsPort=u0ANSIBLE_REMOTE_PORT/remote_port/ansible_port setsIdentityFile="t"uJANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file setsKbdInteractiveAuthentication=nosIPreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickeysPasswordAuthentication=nou)ansible_password/ansible_ssh_pass not setsUser=u8ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u setsConnectTimeout=uANSIBLE_TIMEOUT/timeout setussh_common_argsu{0}_extra_argsuPlayContext set %si�sCannot write to ControlPath %ssControlPath=t	directoryu,found only ControlPersist; added ControlPath(s-osStrictHostKeyChecking=noN(s-osKbdInteractiveAuthentication=nos-osIPreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickeys-osPasswordAuthentication=no((R6R7RqRR:R;R<Rtssh_executableR3tDEFAULT_SFTP_BATCH_MODER~t	verbositytappendtssh_argst_split_ssh_argstHOST_KEY_CHECKINGRSRjtprivate_key_filetpatht
expanduserRTttimeoutR tgetattrRyR"t_persistentRRYRtaccesstW_OKRRWReRRUtdict(RAtbinaryt
other_argsRwR|RttkeyRUtopttattrRuRvtcpdirtb_cpdir((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyt_build_commands�	0"
1	(,

%.	
	,&cC`svtjd�y!|jt|��|j�Wn*ttfk
rZtd|j��nXtjdt	|��dS(s�
        Writes initial data to the stdin filehandle of the subprocess and closes
        it. (The handle must be closed; otherwise, for example, "sftp -b -" will
        just hang forever waiting for more commands.)
        sSending initial datasbSSH Error: data could not be sent to remote host "%s". Make sure this host can be reached over sshsSent initial data (%d bytes)N(
RtdebugtwriteRtcloseRotIOErrorRRtlen(RAtfhtin_data((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyt_send_initial_data�s
cC`s,y|j�Wnttfk
r'nXdS(s& Terminate a process, ignoring errors N(t	terminateRoR�(Rp((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyt_terminate_process�sc

C`s�g}x\|jt�D]K}t|�jd�}t}|jjr�|j|�r�tj	d|||f�t|j
d<t}n�|jjr�|j|�r�tj	d|||f�t|j
d<t}n~|r|j
|�rtj	d|||f�t|j
d<n?|rK|j|�rKtj	d|||f�t|j
d	<n|s|j|�qqWd
}	|r�|djd�r�|d}	|d }nd
j|�|	fS(
si
        Takes a string, extracts complete lines from it, tests to see if they
        are a prompt, error message, etc., and sets appropriate flags in self.
        Prompt and success lines are removed.

        Returns the processed (i.e. possibly-edited) output and the unprocessed
        remainder (to be processed with the next chunk) as strings.
        s
s*become_prompt: (source=%s, state=%s): '%s't
become_prompts+become_success: (source=%s, state=%s): '%s'tbecome_successs)become_error: (source=%s, state=%s): '%s'tbecome_errors2become_nopasswd_error: (source=%s, state=%s): '%s'tbecome_nopasswd_errorti����s
(t
splitlinesR"RR!R$R6tprompttcheck_password_promptRR�t_flagstsuccess_keytcheck_become_successtcheck_incorrect_passwordtcheck_missing_passwordR�tendswithR{(
RAtsourcetstatetb_chunktsudoabletoutputtb_linetdisplay_linetsuppress_outputt	remainder((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyt_examine_output�s2

	
	

cC`s�	ttttt|���}tjdjdj|��d|j�d"}t
|ttf�rpt
|�}nttt
|��}|sRy�tj�\}}tr�|jjr�tj|d|dtjdtjd|j�}n'tj|d|dtjdtj�}tj|dd	�}	tj|�WqRttfk
rNd"}qRXn|s�tr�|jjr�tj|dtjdtjdtjd|j�}n*tj|dtjdtjdtj�}|j}	n|jjrxtj|jd	�y+tj|jd
t
|jj�d�Wn=tk
r`}
|
jtjksW|j �d"kra�qanXtj|jd
�ndd
ddg}|j!d�}t
|j"d��|krG|rG|jj#r�|j!d�}tj$d|||jj#f�qG|jj%rG|jj&rG|j!d
�}tj$d|||jj&f�qGnd}
}d}}t'dt(dt(dt(dt(�|_)d|jj*}xF|j+|j,fD]2}t-j-|t-j.t-j-|t-j/�tj0B�q�Wt1j2�}|j3|j+t1j4�|j3|j,t1j4�||dkrC|rC|j5|	|�|d
7}nzYxRt6r�|j �}|j7|�}|s�||j!d
�kr�|d"k	r�Pn|j8|�t9d|t:|
�f��q�nx�|D]�\}}|j;|j+krG|j+j<�}|dkr|j=|j+�d
}n||7}tj$d|t|�f�q�|j;|j,kr�|j,j<�}|dkr�|j=|j,�n||7}tj$d|t|�f�q�q�W||j!d�krC|r|j>d||||�\}}|
|7}
|}n|ra|j>d||||�\}}||7}|}qan|
|7}
||7}d}}||dkr�|j)dr�tj$d�|	jt
|jj?�d�|	j@�t(|j)d<|d
7}q�|j)dr�|d
7}q�n||d
kr|j)dr-tjd�t(|j)d<|d
7}q|j)drztjd�|j8|�t(|j)d<t9d|jjA��q|j)dr�tjd�|j8|�t(|j)d<t9d |jjA��q|j)drtjd!�|j8|�t(|j)d<t9d|jjA��qn||dkrM|r@|j5|	|�n|d
7}n|d"k	r}|jB�sm|rqPnd	}qIqI|jB�sI|jC�PqIqIWWd"|j�|	j�XtDjEr�|d	d#kr�|jFd$kr�t9d%��q�nd&|kp	d'|k}|jFd	kr*	|r*	t9d(��nd)|k}|jFd*krZ	|rZ	tGd+��n|jFd*kr�	|r�	|r�	tHd,|j��n|jF|
|fS(-sL
        Starts the command and communicates with it until it ends.
        u
SSH: EXEC {0}u RRfRgRhtpass_fdstwbiis
tawaiting_prompttawaiting_escalationt
ready_to_sendt
awaiting_exitR�uInitial state: %s: %sR�R�R�R�R�is9Timeout (%ds) waiting for privilege escalation prompt: %ss"stdout chunk (state=%s):
>>>%s<<<
s"stderr chunk (state=%s):
>>>%s<<<
s)Sending become_pass in response to promptsEscalation succeededsEscalation failedsIncorrect %s passwordsEscalation requires passwordsMissing %s passwordsEscalation prompt repeatedNRis�Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this.  Please add this host's fingerprint to your known_hosts file to manage this host.s(Bad configuration option: ControlPersists,unknown configuration option: ControlPersists�using -c ssh on certain older ssh versions may not support ControlPersist, set ANSIBLE_SSH_ARGS="" (or ssh_args in [ssh_connection] section of the config file) before running agains4mux_client_hello_exchange: write packet: Broken pipei�sHSSH Error: data could not be sent because of ControlPersist broken pipe.sbSSH Error: data could not be sent to remote host "%s". Make sure this host can be reached over ssh(IR9tmapRRRR%R R{RRjR8RR
RtptytopenptyRR6R7RkRlRmR<R:tfdopenR�RoR�RfR�terrnotEPIPEtpolltindext
get_optionR�R�tbecomeR�R�R$R�R�RgRhtfcntltF_SETFLtF_GETFLt
O_NONBLOCKR
tDefaultSelectortregistert
EVENT_READR�R"tselectR�RRtfileobjtreadt
unregisterR�tbecome_passtflusht
become_methodtget_maptwaitR3R�t
returncodeRR(RARGR�R�tcheckrctdisplay_cmdRptmastertslaveRfRHtstatesR�tb_stdouttb_stderrtb_tmp_stdouttb_tmp_stderrR�tfdtselectorR�teventsR�teventR�tb_outputt
b_unprocessedtcontrolpersisterrortcontrolpersist_broken_pipe((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyt	_bare_run�s(3'
6*+$
!$'

0
	
"	
 
$"
	"




























	cC`s|j||d|d|�S(s=Wrapper around _bare_run that retries the connection
        R�R�(R�(RARGR�R�R�((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyt_run�sc	C`s/d|j}g}|jj}|dk	rp|d#krFtd��n|dkrddddg}q|g}n�tj}t|t�s�|j	�}|t
kr�t|dt�}q�|dkr�td��q�n|dkr�dddg}n!|t
kr	dg}n	dg}x�|D]�}d}	}
}|dkr�|j|jd	�t|��}d
j|t|�t|��}
t|
dd�}
|j||
d
t�\}	}
}n�|dkrS|jd�}|dkr|j|dj|t|��|�}n'|j||dj|t|���}d}
|j||
d
t�\}	}
}n�|dkrL|dkr�|jd|tfdt�\}	}
}tt|dd�d��}|j|
�WdQXqLtt|dd�d��}t|j�dd�}
WdQX|
sd}nd}|jd|t|fd|
dt�\}	}
}n|	dkre|	|
|fSt|�dkrtjdd||f�tjddt|
��tjddt|��qqW|	d kr�td!|t|�f��n4td"t|�t|�t|
�t|�f��dS($Ns[%s]tsmartRtscptpipeds9transfer_method needs to be one of [smart|sftp|scp|piped]tstricts0scp_if_ssh needs to be one of [smart|True|False]tsftp_executableu{0} {1} {2}
R.tpassthruR�tscp_executabletgetu{0}:{1}sdd if=%s bs=%sR�R0R1swb+trbs count=0R�sdd of=%s bs=%s%sR�iiR*sS%s transfer mechanism failed on %s. Use ANSIBLE_DEBUG=1 to see detailed informations%si�s(Failed to connect to the host via %s: %ss'failed to transfer file to %s %s:
%s
%s(R�ssftpsscpR�( RR6tssh_transfer_methodRjR	R3tDEFAULT_SCP_IF_SSHR8tboolRrRRR$R"R�R�RR RR�texec_commandRtopenR�R�R�RtwarningR�RRR(RAtin_pathtout_pathtsftp_actionRtmethodsR�t
scp_if_sshtmethodR�RgRhRGR�R�tout_filetftcount((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyt_file_transport_commandsp
		
!!$*'$(	4
!c
C`s�tt|�j|d|d|�tjdj|jj�d|jj�|jj	}|j
d�}|r�|r�|r�|d|j|f}n||j|f}|j|�}|j
||d|�\}}}	|||	fS(s" run a command on the remote host R�R�u&ESTABLISH SSH CONNECTION FOR USER: {0}Rtuse_ttys-tt(RPRMR�RR%R R6RTRRR�R�RR�R�(
RARGR�R�R�R
RBR�RgRh((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyR�Ys"(!cC`s�tt|�j||�tjdj||�d|j�tjj	t
|dd��swtdjt|����n|j
||d�S(s& transfer a file from local to remote uPUT {0} TO {1}RR0R1s"file or module does not exist: {0}tput(RPRMtput_fileRR%R RR:R�texistsRRRR	(RARR((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyRus
"cC`sNtt|�j||�tjdj||�d|j�|j||d�S(s# fetch a file from remote to local uFETCH {0} TO {1}RR�(RPRMt
fetch_fileRR%R RR	(RARR((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyR�s"c	C`sS|j|jjdd|j�}|j|�\}}g|D]}|jd�r=|^q=}t}|r�t|�dkr�|djdd�d}t	j
j|�r�t}q�n|r�t}n|rEt
jd|�tj|d	tjd
tjdtj�}|j�\}	}
|j�}|dkrEt
jd|
�qEn|j�dS(
Ns-OtstopsControlPath=it=ii����usending stop: %sRfRgRhsFailed to reset connection:%s(R�R6R�RRyt
startswithR$R�tsplitR:R�R
R"RR%RkRlRmRnR�R�R�(RARGRuRvRttcp_argt	run_resettcp_pathRpRgRhtstatus_code((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pytreset�s$!(	*cC`s
t|_dS(N(R$t
_connected(RA((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyR��s( RRRt	transportR"thas_pipeliningt	frozensetR3tBECOME_METHODSt
differencetbecome_methodsRQRZtstaticmethodRjReRqRyR~R�R�R�R�R�RLR�R	R�RRRR�(((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyRM�s2	
	
		�	
	.�T			(:t
__future__RRRttypet
__metaclass__t
DOCUMENTATIONR�R�R[R:R�RkR?t	functoolsRtansibleRR3tansible.errorsRRRRR	tansible.compatR
tansible.module_utils.sixRRR
tansible.module_utils.six.movesRtansible.module_utils._textRRRt)ansible.module_utils.parsing.convert_boolRRtansible.plugins.connectionRRtansible.utils.pathRRt__main__RtImportErrortansible.utils.displayRR#RjRiRR-RLRM(((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.pyt<module>sB�"

	1	L

Anon7 - 2022
AnonSec Team