403Webshell
Server IP : 3.96.16.70  /  Your IP : 216.73.216.15
Web Server : Apache
System : Linux ip-172-31-26-103.ca-central-1.compute.internal 6.1.163-186.299.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Feb 24 16:35:42 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/self/root/usr/lib/python3.9/site-packages/awscli/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/usr/lib/python3.9/site-packages/awscli/__pycache__/compat.cpython-39.pyc
a

wA�iiL�@s�ddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlmZddlZddlmZddlmZddlmZddlmZddlmZmZejddkZe Z!ej"Z#ej$Z$ej%Z%e&Z'e(Z)zddl*Z*ej+Z,Wne-�yej.Z,Yn0zddl/Z/Wne-�y>dZ/Yn0ej	dkZ0ej	d	kZ1e0�r`d
Z2ndZ2e3Z4e(Z)dZ5d
Z6e�7e8�Z9Gdd�de:�Z;Gdd�d�Z<dd�Z=dd�Z>dd�Z?dd�Z@dd�ZAdd�ZBdd�ZCdHd!d"�ZDdId#d$�ZEd%d&�ZFd'd(�ZGd)d*�ZHd+d,�ZIdJd-d.�ZJd/d0�ZKdKd1d2�ZLejMd3d4��ZNzdd5l	mOZOWn�e-�y�d6ZPd7d8�ZQe�Rd9ejS�ZTe�Rd:ejS�ZUe�Rd;ejS�ZVd<ZWd=d>�ZXe�Rd?ejY�ZZe�Rd@ejY�Z[e�RdAejY�Z\dBdBdBeWdCfdDdE�ZOdFdG�Z]Yn0dS)L�N)�RawConfigParser)�partial)�URLError)�urlopen)�OrderedDict�six��win32�darwinZmoreZlessZAWS_CLI_OUTPUT_ENCODINGZ
PYTHONUTF8cseZdZ�fdd�Z�ZS)�StdinMissingErrorcsd}tt|��|�dS)Nz;stdin is required for this operation, but is not available.)�superr�__init__)�self�message��	__class__��1/usr/lib/python3.9/site-packages/awscli/compat.pyr
RszStdinMissingError.__init__)�__name__�
__module__�__qualname__r
�
__classcell__rrrrrQsrc@s eZdZdZdd�Zdd�ZdS)�NonTranslatedStdoutaThis context manager sets the line-end translation mode for stdout.

    It is deliberately set to binary mode so that `
` does not get added to
    the line ending. This can be useful when printing commands where a
    windows style line ending would cause errors.
    cCs.tjdkr(ddl}|�tj��tj�|_tjS�Nr	r)	�sys�platform�msvcrt�setmode�stdout�fileno�osZO_BINARY�
previous_mode)rrrrr�	__enter___s
�zNonTranslatedStdout.__enter__cCs*tjdkr&ddl}|�tj��|j�dSr)rrrrrrr!)r�type�value�	tracebackrrrr�__exit__hs
zNonTranslatedStdout.__exit__N)rrr�__doc__r"r&rrrrrWs	rcCs6t|t�r|St|t�r"|�d�Stdt|���dS)N�utf-8z,Expected str, unicode or bytes, received %s.)�
isinstance�str�bytes�decode�
ValueErrorr#)�srrr�ensure_text_typeos



r/cCstjdurt��tjjS�N)r�stdinr�bufferrrrr�get_binary_stdinws
r3cCstjjSr0)rrr2rrrr�get_binary_stdout}sr4cCst|�|Sr0)�set_preferred_output_encoding)�stream�errorsrrr�_get_text_writer�sr8c	CsRttjvrNzd�tjt�Wn.tyLtdtjt�dt�d���Yn0dS)a
    Validate that the preferred output encoding is valid if it's set.
    We do this separately from set_preferred_output_encoding because that
    may be called from error handlers while handling another exception, which
    we still want to print successfully.
    �zUnknown codec `z` specified for �.N)�OUTPUT_ENCODING_ENV_VARr �environ�encode�LookupErrorr-rrrr�"validate_preferred_output_encoding�s
���r?c
Cs|ttjvrTz|jtjtd�WqxtyPt�dtjt�dt�d��Yqx0n$ttjvrxtjtdkrx|jdd�dS)a
    If the user specified AWS_CLI_OUTPUT_ENCODING, use that encoding
    for the output stream. This lets us move away from the Python-specific
    environment variables in the long-term, though we support PYTHONUTF8
    here as well for backwards compatability.
    ��encodingzIgnoring invalid codec z specified for r:�1�UTF-8N)r;r r<�reconfigurer>�LOG�debug�PYTHONUTF8_ENV_VAR)r6rrrr5�s 
�����r5cOs<dtjvrtjdSt�tj�}|dvr,dStj|i|��S)z�Use AWS_CLI_FILE_ENCODING environment variable value as encoding,
    if it's not set use locale.getpreferredencoding()
    to find the preferred encoding.
    ZAWS_CLI_FILE_ENCODING)�CZPOSIXrC)r r<�locale�	setlocale�LC_CTYPE�getpreferredencoding)�args�kwargsZlc_typerrrrL�s

rL�rcCs:tj}|durttj|d�}d|vr*t�}t||||d�S)aBack-port open() that accepts an encoding argument.

    In python3 this uses the built in open() and in python2 this
    uses the io.open() function.

    If the file is not being opened in binary mode, then we'll
    use getpreferredencoding() to find the preferred
    encoding.

    N)�mode�b)rA�opener)r �openrrL)�filenamerPrAZaccess_permissionsrRrrr�compat_open�srUcCs<|durtj}t|dd�r(|j�|�n|�|�d��dS)z=
    This function is used to write raw bytes to stdout.
    Nr2r()rr�getattrr2�writer,)Z	statementrrrr�bytes_print�s
rXcCsttjdd�S)N�strict�r7)r8rrrrrr�get_stdout_text_writer�sr[cCsttjdd�S)N�replacerZ)r8r�stderrrrrr�get_stderr_text_writer�sr^cCsttjdd�}|durd}|S)NrAr()rVr�
__stderr__r@rrr�get_stderr_encoding�sr`cCsNtj�|�tj��zddl}t�WStyHt�d�t�YS0dS)au
    Cygwin's pty's are based on pipes. Therefore, when it interacts with a Win32
    program (such as Win32 python), what that program sees is a pipe instead of
    a console. This is important because python buffers pipes, and so on a
    pty-based terminal, text will not necessarily appear immediately. In most
    cases, this isn't a big deal. But when we're doing an interactive prompt,
    the result is that the prompts won't display until we fill the buffer. Since
    raw_input does not flush the prompt, we need to manually write and flush it.

    See https://github.com/mintty/mintty/issues/56 for more details.
    rNzreadline module not available)	rrrW�flush�readline�	raw_input�ImportErrorrErF)�promptrbrrr�compat_input�s

rfcCs,|durtj}|dkrt|�St�|�SdS)z�Return a shell-escaped version of the string *s*

    Unfortunately `shlex.quote` doesn't support Windows, so this method
    provides that functionality.
    Nr	)rr�_windows_shell_quote�shlex�quote)r.rrrr�compat_shell_quotes
rjcCs�|sdSg}d}|D]l}|dkr*|d7}q|dkr\|dkrP|�d|d�d}|�d�q|dkrv|�d|�d}|�|�q|dkr�|�d|�d�|�}d	|vs�d
|vr�d|S|S)a�Return a Windows shell-escaped version of the string *s*

    Windows has potentially bizarre rules depending on where you look. When
    spawning a process via the Windows C runtime the rules are as follows:

    https://docs.microsoft.com/en-us/cpp/cpp/parsing-cpp-command-line-arguments

    To summarize the relevant bits:

    * Only space and tab are valid delimiters
    * Double quotes are the only valid quotes
    * Backslash is interpreted literally unless it is part of a chain that
      leads up to a double quote. Then the backslashes escape the backslashes,
      and if there is an odd number the final backslash escapes the quote.

    :param s: A string to escape
    :return: An escaped string
    z""r�\��"�z\"r9� �	z"%s")�append�join)r.ZbuffZnum_backspaces�	characterZnew_srrrrgs,

rgcCs4i}|durt}trddi}n
t�|�}||d<|S)z�Returns the default pager to use dependent on platform

    :rtype: str
    :returns: A string represent the paging command to run based on the
        platform being used.
    N�shellTrM)�
default_pager�
is_windowsrh�split)Z	pager_cmdZpopen_kwargsrrr�get_popen_kwargs_for_pager_cmd\s

rxccs�trtjg}ntjtjtjg}g}|D]}|�t�|tj��q&z,dVWt|�D]\}}t�|||�qRn$t|�D]\}}t�|||�qv0dS)zG
    Ignores user entered signals to avoid process getting killed.
    N)rv�signal�SIGINT�SIGQUIT�SIGTSTPrq�SIG_IGN�	enumerate)Zsignal_listZactual_signalsZuser_signalZsigrrr�ignore_user_entered_signalsps
�r)�linux_distributionz/etccCs�tj�d�r�d}td��f}|D]P}|��}t|�dkr|\}}nq|dkrT|��}q|dkr|�d�}|d}qWd�n1s�0Y|||fStj�d��rtd��\}|D]F}|�d�}	t|	�dkr�|	d	d
kr�d
|	d|fWd�Sq�Wd�n1�s0Ytj�d��r�t�d�}
t	t|
�dd
d
�D]"}|
|dd�dk�rH|
|=�qH|
�r�|
�
�d}|
d
dd�}|||fS|||fS)z�Tries some special tricks to get the distribution
        information in case the default method fails.
        Currently supports older SuSE Linux, Caldera OpenLinux and
        Slackware Linux distributions.
        z/var/adm/inst-log/info�SuSErnZMIN_DIST_VERSIONZ
DIST_IDENT�-Nz/etc/.installedrZ	OpenLinuxrlz/usr/lib/setup����zslack-version-�	slackware)r �path�existsrSrw�len�strip�isdir�listdir�range�sort)�distname�version�id�f�lineZtv�tagr$�valuesZpkgZverfiles�nrrr�_dist_try_harder�s>



(


B


r�z(\w+)[-_](release|version)z'(.+) release ([\d.]+)[^(]*(?:\((.+)\))?z1([^0-9]+)(?: release )?([\d.]+)[^(]*(?:\((.+)\))?)r�ZdebianZfedoraZredhatZcentosZmandrakeZmandrivaZrocksr�Z	yellowdogZgentooZUnitedLinuxZ
turbolinuxZarchZmageiacCszd}d}t�|�}|dur&t|���St�|�}|durDt|���S|����}|rp|d}t|�dkrp|d}d||fS)Nr9rrl)�_lsb_release_version�match�tuple�groups�_release_versionr�rwr�)�	firstliner�r��m�lrrr�_parse_release_file�s

r�z(?:DISTRIB_ID\s*=)\s*(.*)z(?:DISTRIB_RELEASE\s*=)\s*(.*)z(?:DISTRIB_CODENAME\s*=)\s*(.*)r9rlcCst|||||�Sr0)�_linux_distribution)r�r�r��supported_dists�full_distribution_namerrrr��s
�r�c	Cs�z�td���}|D]X}t�|�}|r0|�d���}t�|�}|rL|�d���}	t�|�}|r|�d���}
q|r�|	r�||	|
fWd�WSWd�n1s�0YWnttfy�Yn0zt	�
t�}Wnty�|||fYS0|��|D]:}t
�|�}|du�r�|��\}
}|
|v�r�|
}�qD�q�t|||�Stt	j�t|�ddd��}|��}Wd�n1�s|0Yt|�\}
}}|
�r�|�r�|
}|�r�|}|�r�|}|||fS)a�Tries to determine the name of the Linux OS distribution name.
        The function first looks for a distribution release file in
        /etc and then reverts to _dist_try_harder() in case no
        suitable files are found.
        supported_dists may be given to define the set of Linux
        distributions to look for. It defaults to a list of currently
        supported Linux distributions identified by their release file
        name.
        If full_distribution_name is true (default), the full
        distribution read from the OS is returned. Otherwise the short
        name taken from supported_dists is used.
        Returns a tuple (distname, version, id) which default to the
        args given as parameters.
        z/etc/lsb-releaserlNr(�surrogateescape)rAr7)rS�_distributor_id_file_re�search�groupr��_release_file_re�_codename_file_re�OSError�UnboundLocalErrorr r��_UNIXCONFDIRr��_release_filenamer�r�r�r�rrrbr�)r�r�r�r�r�Z	etclsbrelr�r�Z_u_distnameZ
_u_versionZ_u_idZetc�fileZ	_distnameZdummyr�r��_versionZ_idrrrr�sX



<



�(r�)rONN)N)N)N)^�collections.abc�abcZcollections_abc�
contextlib�iorIZloggingr Zos.pathrZqueue�rerhryr�urllib.parse�parse�urlparseZzipfileZconfigparserr�	functoolsrZurllib.errorrZurllib.requestrZbotocore.compatrr�version_infoZPY3�nextZadvance_iteratorriZshlex_quote�StringIO�BytesIOr+Zbinary_type�inputrc�zlibZZIP_DEFLATEDZZIP_COMPRESSION_MODErdZ
ZIP_STOREDZsqlite3rvZis_macosru�map�imapr;rGZ	getLoggerrrE�	Exceptionrrr/r3r4r8r?r5rLrUrXr[r^r`rfrjrgrx�contextmanagerrr�r�r��compile�ASCIIr�r�r�Z_supported_distsr��Ir�r�r�r�rrrr�<module>
s�







?

/��
�


Youez - 2016 - github.com/yon3zu
LinuXploit