shell bypass 403
�
f=Q � �� � d dl Z d dlZd dlZd dlZd dlZd dlZ d dlmZ ddl
mZ ddlm
Z
mZmZmZmZmZ ddlmZmZ ej, e� ZdZdZ G d � d
e� Zy# e$ r d dl mZ Y �Mw xY w)� N)�Thread� )�DistlibException)�HTTPBasicAuthHandler�Request�HTTPPasswordMgr�urlparse�build_opener�string_types)�zip_dir�ServerProxyzhttps://pypi.org/pypi�pypic � � e Zd ZdZdZdd�Zd� Zd� Zd� Zd� Z d � Z
d
� Zdd�Zdd�Z
dd
�Z dd�Zd� Z dd�Z dd�Zdd�Zd� Zd� Zdd�Zy)�PackageIndexzc
This class represents a package index compatible with PyPI, the Python
Package Index.
s. ----------ThIs_Is_tHe_distlib_index_bouNdaRY_$Nc �� � |xs t | _ | j � t | j � \ }}}}}}|s|s|s|dvrt d| j z � �d| _ d| _ d| _ d| _ t t j d� 5 }dD ]+ } t j | dg||�� }
|
dk( r | | _ n�- ddd� y# t $ r Y �Bw xY w# 1 sw Y yxY w) z�
Initialise an instance.
:param url: The URL of the index. If not specified, the URL for PyPI is
used.
)�http�httpszinvalid repository: %sN�w)�gpg�gpg2z --version��stdout�stderrr )�
DEFAULT_INDEX�url�read_configurationr r �password_handler�ssl_verifierr �gpg_home�open�os�devnull�
subprocess�
check_call�OSError)�selfr �scheme�netloc�path�params�query�frag�sink�s�rcs �D/usr/local/python-3.12/lib/python3.12/site-packages/distlib/index.py�__init__zPackageIndex.__init__% s� � � �'�-������!�4<�T�X�X�4F�1����f�e�T��U�d�f�4E�&E�"�#;�d�h�h�#F�G�G� $��� ��������
�
�"�*�*�c�
"� �d� %�
���#�.�.��;�/?��6:�<�B��Q�w�#$���� �
� � �� � ���� � �s0 �C�&C�C� C�C�C�C�C&c � � ddl m} |� S )zs
Get the distutils command for interacting with PyPI configurations.
:return: the command.
r )�_get_pypirc_command)�utilr3 )r&