404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.219.107.243: ~ $
3

�^��@sdddlZddlmZmZddlmZedddg�ZGdd�d�ZGd	d
�d
e�ZGdd�de�Z	dS)
�N)�ABC�abstractmethod)�
namedtupleZ
modified_item�left�rightc@sneZdZdZdd�Zedd��Zejdd��Zedd��Zejd	d��Zd
d�Z	e
dd
��Ze
ddd��ZdS)�
Differencez&Base class for all policy differences.cCstjt�|_||_||_dS)N)�loggingZ	getLogger�__name__�log�left_policy�right_policy)�selfrr�r�"/usr/lib64/python3.6/difference.py�__init__szDifference.__init__cCs|jS)N)�_left_policy)r
rrrr'szDifference.left_policycCs$|jjdj|��||_|j�dS)Nz"Policy diff left policy set to {0})r
�info�formatr�_reset_diff)r
�policyrrrr+scCs|jS)N)�
_right_policy)r
rrrr1szDifference.right_policycCs$|jjdj|��||_|j�dS)Nz#Policy diff right policy set to {0})r
rrrr)r
rrrrr5scCst�dS)z%Reset diff results on policy changes.N)�NotImplementedError)r
rrrr>szDifference._reset_diffccs.x(|D] }x|j�D]}||�VqWqWdS)z4Generator that yields a wrapped, expanded rule list.N)�expand)Z	rule_list�WrapperZunexpanded_ruleZ
expanded_rulerrr�_expand_generatorBs
zDifference._expand_generatorNTcCs�t|�}t|�}||}||}t�}t|||d�}	t|||d�}
x$t|	|
�D]\}}|j||f�qRW|r�tdd�|D��tdd�|D��tdd�|D��fS|||fSdS)a�
        Standard diff of two sets.

        Parameters:
        left        An iterable
        right       An iterable

        Return:
        tuple       (added, removed, matched)

        added       Set of items in right but not left
        removed     Set of items in left but not right
        matched     Set of items in both left and right.  This is
                    in the form of tuples with the matching item
                    from left and right
        )�keycss|]}|jVqdS)N)�origin)�.0�irrr�	<genexpr>sz'Difference._set_diff.<locals>.<genexpr>css|]}|jVqdS)N)r)rrrrrr�scss|]\}}|j|jfVqdS)N)r)rrrrrrr�sN)�set�sorted�zip�add)rrrZunwrapZ
left_itemsZright_itemsZadded_itemsZ
removed_itemsZ
matched_itemsZleft_matched_itemsZright_matched_itemsrrr�	_set_diffLszDifference._set_diff)NT)
r	�
__module__�__qualname__�__doc__r�propertyr�setterrr�staticmethodrr$rrrrrs	
rc@sHeZdZdZdZdd�Zedd��Zedd	��Zed
d��Z	dd
�Z
dS)rz/Abstract base class for policy object wrappers.rrcCsdj|t|j��S)Nz&<{0.__class__.__name__}(Wrapping {1})>)r�reprr)r
rrr�__repr__�szWrapper.__repr__cCsdS)Nr)r
rrr�__hash__�szWrapper.__hash__cCsdS)Nr)r
�otherrrr�__eq__�szWrapper.__eq__cCsdS)Nr)r
r.rrr�__lt__�szWrapper.__lt__cCs
||kS)Nr)r
r.rrr�__ne__�szWrapper.__ne__N)rr)r	r%r&r'�	__slots__r,rr-r/r0r1rrrrr�src@s4eZdZdZdZdd�Zdd�Zdd�Zd	d
�ZdS)�
SymbolWrapperz�
    General wrapper for policy symbols, e.g. types, roles
    to provide a diff-specific equality operation based
    on its name.
    �namecCs ||_t|�|_t|j�|_dS)N)r�strr4�hashr)r
Zsymbolrrrr�s
zSymbolWrapper.__init__cCs|jS)N)r)r
rrrr-�szSymbolWrapper.__hash__cCs|j|jkS)N)r4)r
r.rrrr0�szSymbolWrapper.__lt__cCs|j|jkS)N)r4)r
r.rrrr/�szSymbolWrapper.__eq__N)	r	r%r&r'r2rr-r0r/rrrrr3�sr3)
r�abcrr�collectionsrZmodified_item_recordrrr3rrrr�<module>sk

Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 1.99 KB 0644
__init__.cpython-36.pyc File 1.99 KB 0644
bool.cpython-36.opt-1.pyc File 2.12 KB 0644
bool.cpython-36.pyc File 2.12 KB 0644
bounds.cpython-36.opt-1.pyc File 3.42 KB 0644
bounds.cpython-36.pyc File 3.42 KB 0644
commons.cpython-36.opt-1.pyc File 1.82 KB 0644
commons.cpython-36.pyc File 1.82 KB 0644
conditional.cpython-36.opt-1.pyc File 1.42 KB 0644
conditional.cpython-36.pyc File 1.42 KB 0644
constraints.cpython-36.opt-1.pyc File 7.03 KB 0644
constraints.cpython-36.pyc File 7.03 KB 0644
context.cpython-36.opt-1.pyc File 1.45 KB 0644
context.cpython-36.pyc File 1.45 KB 0644
default.cpython-36.opt-1.pyc File 2.85 KB 0644
default.cpython-36.pyc File 2.85 KB 0644
descriptors.cpython-36.opt-1.pyc File 1.07 KB 0644
descriptors.cpython-36.pyc File 1.07 KB 0644
difference.cpython-36.opt-1.pyc File 4.83 KB 0644
difference.cpython-36.pyc File 5 KB 0644
fsuse.cpython-36.opt-1.pyc File 2.64 KB 0644
fsuse.cpython-36.pyc File 2.64 KB 0644
genfscon.cpython-36.opt-1.pyc File 2.73 KB 0644
genfscon.cpython-36.pyc File 2.73 KB 0644
ibendportcon.cpython-36.opt-1.pyc File 2.75 KB 0644
ibendportcon.cpython-36.pyc File 2.75 KB 0644
ibpkeycon.cpython-36.opt-1.pyc File 2.73 KB 0644
ibpkeycon.cpython-36.pyc File 2.73 KB 0644
initsid.cpython-36.opt-1.pyc File 1.86 KB 0644
initsid.cpython-36.pyc File 1.86 KB 0644
mls.cpython-36.opt-1.pyc File 8.62 KB 0644
mls.cpython-36.pyc File 8.62 KB 0644
mlsrules.cpython-36.opt-1.pyc File 3.4 KB 0644
mlsrules.cpython-36.pyc File 3.4 KB 0644
netifcon.cpython-36.opt-1.pyc File 2.76 KB 0644
netifcon.cpython-36.pyc File 2.76 KB 0644
nodecon.cpython-36.opt-1.pyc File 2.64 KB 0644
nodecon.cpython-36.pyc File 2.64 KB 0644
objclass.cpython-36.opt-1.pyc File 2.43 KB 0644
objclass.cpython-36.pyc File 2.43 KB 0644
polcap.cpython-36.opt-1.pyc File 1.44 KB 0644
polcap.cpython-36.pyc File 1.44 KB 0644
portcon.cpython-36.opt-1.pyc File 2.68 KB 0644
portcon.cpython-36.pyc File 2.68 KB 0644
properties.cpython-36.opt-1.pyc File 1.3 KB 0644
properties.cpython-36.pyc File 1.3 KB 0644
rbacrules.cpython-36.opt-1.pyc File 4.85 KB 0644
rbacrules.cpython-36.pyc File 4.85 KB 0644
roles.cpython-36.opt-1.pyc File 2.39 KB 0644
roles.cpython-36.pyc File 2.39 KB 0644
terules.cpython-36.opt-1.pyc File 14.25 KB 0644
terules.cpython-36.pyc File 14.25 KB 0644
typeattr.cpython-36.opt-1.pyc File 2.52 KB 0644
typeattr.cpython-36.pyc File 2.52 KB 0644
types.cpython-36.opt-1.pyc File 3.08 KB 0644
types.cpython-36.pyc File 3.08 KB 0644
users.cpython-36.opt-1.pyc File 3.05 KB 0644
users.cpython-36.pyc File 3.05 KB 0644