📂 FileMgr
📍
/
usr
/
lib
/
python3
/
dist-packages
/
sos
/
cleaner
/
archives
/
__pycache__
✏️ /usr/lib/python3/dist-packages/sos/cleaner/archives/__pycache__/__init__.cpython-312.pyc
✕ Tutup
� G%@i�] � �v � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlmZ d dl m Z mZmZ d� Z G d� d� Zy)� N)�ProcessPoolExecutor)�file_is_binary�sos_get_command_output�file_is_certificatec �� � t j | � 5 }t j j |d� }t t dd� � |_ |j � D ]� }t j j ||j � }t j j |� }t j j |� }t j j ||g� }||k7 rt d|� d|� �� �|j ||� �� t j j ||j j d� d j d� d � cd d d � S # 1 sw Y y xY w) N�cleaner�fully_trusted_filterc � � | S �N� )�member�paths �?/usr/lib/python3/dist-packages/sos/cleaner/archives/__init__.py�<lambda>z!extract_archive.<locals>.<lambda># s � �&� � z"Attempted path traversal in tarflez != �/����.tarr )�tarfile�open�osr �join�getattr�extraction_filter� getmembers�name�abspath�commonprefix� Exception�extract�split) �archive_path�tmpdir�archiver r �member_path� abs_directory� abs_target�prefixs r �extract_archiver) s4 � � ���l� #� P�w��w�w�|�|�F�I�.�� %,�G�5K�-H�%K��!� �(�(�*� *�F��'�'�,�,�t�V�[�[�9�K��G�G�O�O�D�1�M�������5�J��W�W�)�)�=�*�*E�F�F���&��"D�#)�(�$�}�o�!?� @� @��O�O�F�D�)� *� �w�w�|�|�D�'�,�,�"4�"4�S�"9�"�"=�"C�"C�F�"K�A�"N�O�)P� P� P�s �EE+�+E4c �D � e Zd ZdZdZdZdZdZdZdZ i Z d� Zd� Zd� Z d� Zd � Zd,d�Zd� Zed � � Zed� � Zed� � Zd� Zd� Zd� Zd� Zd,d�Zd,d�Zd,d�Zd,d�Zd� Zed� � Z d� Z!d� Z"d� Z#d� Z$d-d�Z%d� Z&d � Z'd!� Z(d"� Z)d#� Z*d$� Z+d%� Z,d&� Z-d'� Z.d(� Z/d)� Z0d*� Z1d+� Z2y ).�SoSObfuscationArchivea A representation of an extracted archive or an sos archive build directory which is used by SoSCleaner. Each archive that needs to be obfuscated is loaded into an instance of this class. All report-level operations should be contained within this class. r �undeterminedFc � � || _ | j | _ || _ | j j d� d j d� d | _ | j | _ t j d� | _ t j d� | _ | j � | _ d| _ | j � d| _ || _ || _ d | _ | j% d | j � d| j&