Revonzy Mini Shell

Revonzy Mini Shell

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

a

q�qe7�@s�ddlmZmZddlmZmZddlmZddlm	Z	ddl
mZmZGdd	�d	e�Z
Gd
d�de�ZGdd
�d
ee�ZdS)�)�
NamedTuple�Optional�)�Context�Netifcon�)�ContextWrapper)�DiffResultDescriptor)�
Difference�Wrapperc@sJeZdZUdZeed<eeed<eeed<eeed<eeed<dS)�ModifiedNetifconz+Difference details for a modified netifcon.Zrule�
added_context�removed_context�added_packet�removed_packetN)�__name__�
__module__�__qualname__�__doc__r�__annotations__rr�rr�;/usr/lib64/python3.9/site-packages/setools/diff/netifcon.pyrs
rc@sDeZdZdZed�Zed�Zed�Zdd�dd�Zdd�dd�Z	dS)	�NetifconsDifferencez;Determine the difference in netifcons between two policies.�diff_netifconsN)�returnc	Cs�|j�d�|��|�dd�|j��D�dd�|j��D��\|_|_}g|_	|D]|\}}t
|j�t
|j�kr||j}|j}nd}d}t
|j�t
|j�kr�|j}|j}nd}d}|s�|rR|j	�
t|||||��qRdS)z:Generate the difference in netifcons between the policies.zHGenerating netifcon differences from {0.left_policy} to {0.right_policy}css|]}t|�VqdS�N��NetifconWrapper��.0�nrrr�	<genexpr>(�z5NetifconsDifference.diff_netifcons.<locals>.<genexpr>css|]}t|�VqdSrrrrrrr!)r"N)�log�info�formatZ	_set_diffZleft_policyZ	netifconsZright_policy�added_netifcons�removed_netifcons�modified_netifconsr�contextZpacket�appendr)�selfZmatched_netifconsZ
left_netifconZright_netifconrr
rrrrrr!s.
��
�z"NetifconsDifference.diff_netifconscCs"|j�d�d|_d|_d|_dS)z%Reset diff results on policy changes.zResetting netifcon differencesN)r#�debugr&r'r(�r+rrr�_reset_diffFszNetifconsDifference._reset_diff)
rrrrr	r&r'r(rr.rrrrrs%rc@s<eZdZdZdZedd�dd�Zdd�Zd	d
�Zdd�Z	dS)
rz+Wrap netifcon statements for diff purposes.�netifN)�oconrcCs||_|j|_t|�|_dSr)�originr/�hash�key)r+r0rrr�__init__TszNetifconWrapper.__init__cCs|jSr)r3r-rrr�__hash__YszNetifconWrapper.__hash__cCs|j|jkSr�r/�r+�otherrrr�__lt__\szNetifconWrapper.__lt__cCs|j|jkSrr6r7rrr�__eq___szNetifconWrapper.__eq__)
rrrr�	__slots__rr4r5r9r:rrrrrNsrN)�typingrrZ	policyreprrr)rZdescriptorsr	�
differencer
rrrrrrrr�<module>s5

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