Revonzy Mini Shell

Revonzy Mini Shell

Şuanki Dizin: /lib64/python3.9/site-packages/setools/__pycache__/
Dosya Yükle :
Şuanki Dosya : //lib64/python3.9/site-packages/setools/__pycache__/nodeconquery.cpython-39.pyc

a

q�qe��@s�ddlZddlZddlmZmZddlmZmZmZddl	m
Z
ddlmZm
Z
ddlmZeejejfZGdd	�d	e
e�ZdS)
�N)�AF_INET�AF_INET6)�Iterable�Optional�Union�)�MatchContext)�Nodecon�NodeconIPVersion)�PolicyQuerycs�eZdZUdZdZeeed<dZe	ed<dZ
eeed<eeed�dd	��Z
e
jeeeefdd
�dd	��Z
eeed�dd
��Zejeeeefdd
�dd
��Zdd��fdd�Zeed�dd�Z�ZS)�NodeconQueryaI
    Query nodecon statements.

    Parameter:
    policy          The policy to query.

    Keyword Parameters/Class attributes:
    network         The IPv4/IPv6 address or IPv4/IPv6 network address
                    with netmask, e.g. 192.168.1.0/255.255.255.0 or
                    "192.168.1.0/24".
    network_overlap If true, the net will match if it overlaps with
                    the nodecon's network instead of equality.
    ip_version      The IP version of the nodecon to match. (socket.AF_INET
                    for IPv4 or socket.AF_INET6 for IPv6)
    user            The criteria to match the context's user.
    user_regex      If true, regular expression matching
                    will be used on the user.
    role            The criteria to match the context's role.
    role_regex      If true, regular expression matching
                    will be used on the role.
    type_           The criteria to match the context's type.
    type_regex      If true, regular expression matching
                    will be used on the type.
    range_          The criteria to match the context's range.
    range_subset    If true, the criteria will match if it is a subset
                    of the context's range.
    range_overlap   If true, the criteria will match if it overlaps
                    any of the context's range.
    range_superset  If true, the criteria will match if it is a superset
                    of the context's range.
    range_proper    If true, use proper superset/subset operations.
                    No effect if not using set operations.
    N�_networkF�network_overlap�_ip_version)�returncCs|jS�N)r��self�r�:/usr/lib64/python3.9/site-packages/setools/nodeconquery.py�
ip_version;szNodeconQuery.ip_version)�valuercCs|rt�|�|_nd|_dSr)r
�lookupr�rrrrrr?scCs|jSr)r
rrrr�networkFszNodeconQuery.networkcCs|rt�|�|_nd|_dSr)�	ipaddressZ
ip_networkr
rrrrrJscs(tt|�j|fi|��t�t�|_dSr)�superr�__init__�loggingZ	getLogger�__name__�log)r�policy�kwargs��	__class__rrrQszNodeconQuery.__init__ccs�|j�d�|��|j�d�|��|j�d�|��|�|j�|j��D]X}|jr||jrn|j�	|j�s|qLn|j|jks|qL|j
r�|j
|j
kr�qL|�|j�s�qL|VqLdS)z-Generator which yields all matching nodecons.z*Generating nodecon results from {0.policy}z4Network: {0.network!r}, overlap: {0.network_overlap}zIP Version: {0.ip_version!r}N)
r �info�format�debugZ_match_context_debugr!ZnodeconsrrZoverlapsrZ_match_context�context)rZnodeconrrr�resultsUs zNodeconQuery.results)r�
__module__�__qualname__�__doc__r
r�AnyIPNetwork�__annotations__r�boolrr
�propertyr�setterr�strrrrr	r)�
__classcell__rrr#rrs
"r)rrZsocketrr�typingrrrZmixinsrZ	policyrepr	r
�queryrZIPv4NetworkZIPv6Networkr-rrrrr�<module>s

EliteHackz.ORG
Revonzy Mini Shell
root@revonzy.com

Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4