0x1949 Team - FAZEMRX - MANAGER
Edit File: __init__.cpython-310.pyc
o i��d�� � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl m Z d dlmZ d dl m Z d dlmZ d dlmZ d dlmZ d dlmZ d d lmZ d d lmZmZ d dlmZ d dlmZ d d lm Z dZ!G dd� de�Z"dS )� N)�datetime)�ThreadPoolExecutor)�getpass)�Path)�quote)�fill)� SoSCleaner)�SosNode)� ClusterOption�str_to_bool)�SoSComponent)�bold)�__version__z/etc/sos/groups.dc s� e Zd ZdZdZi dd�dd�dd�dd�dd�d d �dd�dg �d d�dd �dg �dg �dg �dd�dd�dd�dd�i dd�dd�dd�dg �dd�d d�d!d�d"d�d#d�d$d�d%d&�d'd�d(d�d)g �d*d�d+d�d,d��i d-d�d.d�d/g �d0d�d1d�d2g �d3d�d4d�d5d�d6d�d7d�d8d�d9d�d:d�d;g �d<g �d=g ��dd>d?d@d dg dddddd dd dA��Z� fdBdC�ZdDdE� ZedFdG� �Z edHdI� �Z edJdK� �ZdLdM� ZedNdO� �Z edPdQ� �Zd�dRdS�ZdTdU� ZdVdW� ZdXdY� ZdZd[� Zd\d]� Zd^d_� Zd`da� Zdbdc� Zddde� Zdfdg� Zdhdi� Zdjdk� Zdldm� Zdndo� Zdpdq� Zdrds� Zdtdu� Z dvdw� Z!dxdy� Z"dzd{� Z#d|d}� Z$d~d� Z%d�d�� Z&d�d�� Z'd�d�� Z(d�d�� Z)d�d�� Z*d�d�� Z+d�d�� Z,d�d�� Z-d�d�� Z.d�d�� Z/� Z0S )��SoSCollectora� sos collect, or SoS Collector, is the formerly standalone sos-collector project, brought into sos natively in 4.0 and later. It is meant to collect sos reports from an arbitrary number of remote nodes, as well as the localhost, at the same time. These nodes may be either user defined, defined by some clustering software, or both. For cluster defined lists of nodes, cluster profiles exist that not only define how these node lists are generated but may also influence the sos report command run on nodes depending upon their role within the cluster. Nodes are connected to via a 'transport' which defaults to the use of OpenSSH's Control Persist feature. Other transport types are available, and may be specifically linked to use with a certain cluster profile (or, at minimum, a node within a certain cluster type even if that profile is not used). sos collect may be run from either a node within the cluster that is capable of enumerating/discovering the other cluster nodes, or may be run from a user's workstation and instructed to first connect to such a node via the --primary option. If run in the latter manner, users will likely want to use the --no-local option, as by default sos collect will also collect an sos report locally. Users should expect this command to result in a tarball containing one or more sos report archives on the system that sos collect was executed on. z8Collect an sos report from multiple nodes simultaneously�all_logsF� alloptions�allow_system_changes�become_root�case_id�chroot�auto�clean�cluster_options�cluster_typeN�container_runtime�domains�disable_parsers�enable_plugins�encrypt_key� �encrypt_pass�group�image�force_pull_imageT�jobs� �journal_sizer �keywords�keyword_file�keep_binary_files�label�list_options�log_size�low_priority�map_file� /etc/sos/cleaner/default_mapping�primary� namespaces�nodes�no_env_vars�no_local� nopasswd_sudo�no_pkg_check� no_update�only_plugins�password�password_per_node�plugopts�plugin_timeout�cmd_timeout�preset� registry_user�registry_password�registry_authfile� save_group�since� skip_commands� skip_files�skip_plugins� �rootiX )�ssh_key�ssh_port�ssh_user�timeout� transport�verify� usernames�upload� upload_url�upload_directory�upload_user�upload_pass� upload_method�upload_no_ssl_verify�upload_protocolc s| t t| ��|||� t�d� g | _g | _d | _d| _d | _ d | _ | jj� d� | jjj| _| j�dd� | j�d� t| jdd� t�� | _zttd d � t�t�� d �D ���| _W n tym | �d� dg| _Y nw | �� | �� | _| jj s�z)| �!� | �"� | �#d d�$dd� t%j&D �� � | �#d| j�'� � | �(� W d S t)y� | �*dd� Y d S ty� � w d S )N�? r �collectr �none� node_list�sudo_pwr c S s g | ]}|d d �qS )r% r � ��.0�ir] r] �8/usr/lib/python3/dist-packages/sos/collector/__init__.py� <listcomp>� s �z)SoSCollector.__init__.<locals>.<listcomp>zkCould not get a list of IP addresses from this hostnamne. This may indicate a DNS issue in your environmentz 127.0.0.1zExecuting %s� c s � � | ]}|V qd S �Nr] )r_ �sr] r] ra � <genexpr>� � � z(SoSCollector.__init__.<locals>.<genexpr>zFound cluster profiles: %s�Exiting on user cancel� )+�superr �__init__�os�umask�client_listr[ r0 � retrieved�clusterr �manifest� components�add_sectionrY � collect_md� add_field�add_list�setattr�opts�socket�gethostname�hostname�list�set�getaddrinfo�ip_addrs� Exception� log_error�_parse_options� load_clusters�clustersr+ �parse_node_strings�parse_cluster_options� log_debug�join�sys�argv�keys�verify_cluster_options�KeyboardInterrupt�exit)�self�parser�parsed_args�cmdline_args�� __class__r] ra rl � sR ��� ���zSoSCollector.__init__c C sD ddl }|jj}i }| �|d�}|D ] }|d | j�||d <