403Webshell
Server IP : 172.67.201.108  /  Your IP : 216.73.216.55
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.7
System : Linux ip-172-31-69-123.ec2.internal 6.1.177-224.371.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jul 27 20:28:29 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.9/site-packages/cfnbootstrap/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.9/site-packages/cfnbootstrap/__pycache__/_ca_uninstall.cpython-39.pyc
a

��Rj��@s�dZddlZddlZddlZddlZddlmZmZddlm	Z	e�
d�ZdZe
d�dd	�Zdee
dd
�dd�Zedd
�dd�Zdeee
ed�dd�Zedkr�e�e��dS)a^
Override CA uninstaller.

Reads the install-marker JSON (or partial-marker recovery file) written by
:mod:`cfnbootstrap._ca_install_win`, calls ``certutil -delstore`` for each
recorded entry, and removes the marker file.

Public surface:

    uninstall_all(marker_path=None)
    main(argv=None)            -- script entrypoint used by bin/cfn-ca-uninstall

Idempotent: no-op when no marker is present. Best-effort: a missing cert in
the Windows store is logged and continued, not raised. We NEVER remove a
cert that is not listed in our marker (or partial-marker) -- that protects
operator-installed CAs.
�N)�List�Optional)�CaOverrideError�cfn.initz[CaOverrideInstall])�returncCs tj�d�}|r|Stj�d�S)zAResolve the install-marker path, honouring the test seam env var.ZCFN_CA_OVERRIDE_MARKER_PATHz/${SystemDrive}\cfn\state\ca-install-marker.json)�os�environ�get�path�
expandvars)�override�r
�>/usr/lib/python3.9/site-packages/cfnbootstrap/_ca_uninstall.py�_default_marker_path-sr)�marker_pathrcCsB|durt�}tjdkr(t�dt�dSddlm}|�|�dS)a�Uninstall every override CA recorded in the marker.

    Args:
        marker_path: Override the default marker path. When ``None``, the
            default is resolved from ``CFN_CA_OVERRIDE_MARKER_PATH`` or
            ``%SystemDrive%\cfn\state\ca-install-marker.json``.

    Raises:
        CaOverrideError: on hard failures (certutil missing, certutil call
            failures that are not "cert not in store"). cfn-ca-uninstall's
            ``main()`` translates these to a non-zero exit code.
    N�ntz�%s cfn-ca-uninstall is a no-op on non-Windows hosts; the override PEM file itself is the install marker on Linux. Remove the PEM to disable.r)�_ca_install_win)	rr�name�log�info�_LOG_PREFIXZcfnbootstraprZuninstall_all_from_marker)rrr
r
r�
uninstall_all5s

�r)�quietrcCsb|r
tjntj}t��}|jsDt�tj�}|�t�	d��|�
|�|�|�t�d��|�dS)zMinimal logging config used by the CLI entrypoint.

    Mirrors the lightweight pattern used by the other bin/cfn-* tools.
    z'%(asctime)s [%(levelname)s] %(message)srN)�loggingZWARNING�INFO�	getLogger�handlersZ
StreamHandler�sys�stderrZsetFormatterZ	FormatterZ
addHandlerZsetLevel)r�level�rootZhandlerr
r
r�_configure_loggingWs�

r!)�argvrc
Cs�tjddd�}|jdddd�|jdd	d
dd�|�|�}t|j�zt|jd
�Wn�ty�}z2t	j
�|jd�t	j
�d|j
�WYd}~dSd}~0ty�}z*t	j
�dtt|�j|f�WYd}~dSd}~00dS)z�CLI entrypoint for ``cfn-ca-uninstall``.

    Returns:
        ``0`` on success, non-zero on hard failure. A clear human-readable
        diagnostic is printed to stderr on failure.
    zcfn-ca-uninstallz�Uninstall override CA(s) previously installed by cfn-bootstrap. Reads the install-marker JSON, calls certutil -delstore for each recorded entry, and removes the marker file. Idempotent.)�prog�descriptionz
--marker-pathNz�Override the install-marker path. Defaults to CFN_CA_OVERRIDE_MARKER_PATH env var or %%SystemDrive%%\cfn\state\ca-install-marker.json.)�default�helpz--quietz-q�
store_truez1Suppress INFO logging; only WARNING+ are emitted.)�actionr&)r�
z"cfn-ca-uninstall failed (kind=%s)
�z%s unexpected error: %s: %s
�r)�argparse�ArgumentParser�add_argument�
parse_argsr!rrrrrr�write�message�kind�	Exceptionr�type�__name__)r"�parser�args�excr
r
r�mainhs:��	�

��r9�__main__)N)N)�__doc__r,rrr�typingrrZcfnbootstrap._ca_installrrrr�strrr�boolr!�intr9r5�exitr
r
r
r�<module>s
"/

Youez - 2016 - github.com/yon3zu
LinuXploit