Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/sos/collector/transports/__pycache__/ |
Upload File : |
o ���b�: � @ sZ d dl Z d dlZd dlZd dlZd dlmZ d dlmZmZ d dl m Z G dd� d�ZdS )� N)�quote)�ConnectionException�CommandTimeoutException)�boldc @ s� e Zd ZdZdZdd� Zdd� Zdd� Zd d � Zdd� Z e d d� �Ze dd� �Ze dd� �Z edd� �Zedd� �Zdd� Zdd� Zdd� Zdd� Zdd � Z # "d6d$d%�Zd&d'� Zd(d)� Zd*d+� Zd,d-� Zd.d/� Zd0d1� Zd2d3� Zd4d5� Zd#S )7�RemoteTransportaO The base class used for defining supported remote transports to connect to remote nodes in conjunction with `sos collect`. This abstraction is used to manage the backend connections to nodes so that SoSNode() objects can be leveraged generically to connect to nodes, inspect those nodes, and run commands on them. � undefinedc C sF || _ |d | _|d | _|d | _d | _t�d�| _t�d�| _d S )N�cmdlineopts�tmpdir� need_sudo�sos�sos_ui) �address�optsr r � _hostname�logging� getLogger�soslog�ui_log)�selfr �commons� r �C/usr/lib/python3/dist-packages/sos/collector/transports/__init__.py�__init__! s zRemoteTransport.__init__c C s d}t �|d|�S )zUAttempts to obfuscate sensitive information in log messages such as passwordsz>(?P<var>(pass|key|secret|PASS|KEY|SECRET).*?=)(?P<value>.*?\s)z\g<var>****** )�re�sub)r �msg�regr r r �_sanitize_log_msg* s z!RemoteTransport._sanitize_log_msgc C �0 t �� d d }d| j||f }| j�|� dS )z#Used to print and log info messages� � � [%s:%s] %sN)�inspect�stack�hostnamer �info�r r �caller�lmsgr r r �log_info0 � zRemoteTransport.log_infoc C r )z$Used to print and log error messagesr r r! N)r"