403Webshell
Server IP : 172.67.201.108  /  Your IP : 216.73.217.93
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5
System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib64/python3.9/site-packages/setools/checker/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib64/python3.9/site-packages/setools/checker/__pycache__/checkermodule.cpython-39.opt-1.pyc
a

��c��@s�UddlZddlZddlmZmZddlmZmZmZm	Z	ddl
mZddlm
Z
ddlmZmZmZmZiZeeefed	<d
gZGdd�de�ZGd
d
�d
ed�ZdS)�N)�ABCMeta�abstractmethod)�Dict�	FrozenSet�List�Mapping�)�InvalidCheckOption)�
SELinuxPolicy�)�CHECK_TYPE_KEY�CHECK_DESC_KEY�
CHECK_DISABLE�GLOBAL_CONFIG_KEYS�CHECKER_REGISTRY�
CheckerModulecs eZdZdZ�fdd�Z�ZS)�
CheckRegistryzQChecker module registry metaclass.  This registers modules in the check registry.cs�|�d�}|�d�}|dkrnt|t�s4td�|���t|t�sLtd�|���|tvrnt|j}td�||���t��	||||�}|r�|t|<|S)N�
check_type�check_configrz,Checker module {} does not set a check_type.z4Checker module {} does not set a valid check_config.z4Checker module {} conflicts with registered check {})
�get�
isinstance�str�	TypeError�format�	frozensetr�__name__�super�__new__)�clsZclsnameZsuperclassesZ
attributedictrrZexisting_check_moduleZclassdef��	__class__��C/usr/lib64/python3.9/site-packages/setools/checker/checkermodule.pyrs$



�
�zCheckRegistry.__new__)r�
__module__�__qualname__�__doc__r�
__classcell__r!r!rr"rsrc@s�eZdZUdZeed<eeed<dZeed<e	j
Zeed<eee
eefdd�d	d
�Zedd�dd
�Zedd�dd�Zedd�dd�Zeed�dd��ZdS)rz/Abstract base class for policy checker modules.rrF�log_passing�policyN)r(�	checkname�config�returncCsb||_||_t�t�|_t|jB}|D]}||vr&td�	|j|���q&|�
t�|_|�
t
�|_dS)Nz{}: Invalid option: {})r(r)�loggingZ	getLoggerr�logrrr	rrr
ZdescrZdisable)�selfr(r)r*Z
valid_options�kr!r!r"�__init__Js
�zCheckerModule.__init__)�msgr+cCs(|j�|�|j�d�|j�|�dS)z Output an informational message.�
N)�output�writer-�debug�r.r1r!r!r"�log_info]szCheckerModule.log_infocCs.|jr|j�d�|��|j�d�|��dS)z�
        Log findings that pass the check.  By default these messages are
        surpressed unless self.log_passing is True.
        z	P   * {}
zP   * {}N)r'r3r4rr-r5r6r!r!r"�log_okcszCheckerModule.log_okcCs4|j�d�|jrdnd|��|j�d�|��dS)z!Log findings that fail the check.z
{}   * {}
�F� zF   * {}N)r3r4rr'r-r5r6r!r!r"�log_faillszCheckerModule.log_fail)r+cCsdS)z�
        Run the configured check on the policy.

        Return:   List of failed items in the check.  If the check passes, list is empty.
        Nr!)r.r!r!r"�runqszCheckerModule.run)rr#r$r%r�__annotations__rr'�bool�sys�stdoutr3r
rr0r7r8r;rrr<r!r!r!r"r3s
	)�	metaclass)r?r,�abcrr�typingrrrr�	exceptionr	Z	policyrepr
Z
globalkeysrr
rrrr�typer=�__all__rrr!r!r!r"�<module>s


Youez - 2016 - github.com/yon3zu
LinuXploit