✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server.blackpussy.asia ​🇻​♯➤ 5.14.0-611.20.1.el9_7.x86_64 #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 163.245.207.76 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.243
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗞 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ mail,mb_send_mail
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /usr/lib64/python3.9/site-packages/setools/__pycache__//infoflow.cpython-39.opt-1.pyc
a

q�qe)>�@s�ddlZddlZddlmZddlmZmZmZmZm	Z	m
Z
z ddlZddl
mZmZmZWn"ey~e�e��d�Yn0ddlmZmZddlmZdd	lmZmZmZmZd
gZedZ Gdd
�d
�Z!Gd
d�d�Z"dS)�N)�suppress)�cast�Iterable�List�Mapping�Optional�Union)�
NetworkXError�NetworkXNoPath�NodeNotFoundzNetworkX failed to import.�)�EdgeAttrIntMax�EdgeAttrList)�
PermissionMap)�AVRule�
SELinuxPolicy�
TERuletype�Type�InfoFlowAnalysis�InfoFlowStepc	@s�eZdZUdZeeed<eed<eed<d.e	eee
eeee
fe
ee
efdd�dd	�Zeed
�dd��Zejedd
�dd��Zeed
�dd��Zejedd�dd��Zeeed
�dd��Zeje
eeee
fdd�dd��Zeeeed�dd�Zd/eee
feee
feeed�dd�Zeee
feee
feed�dd�Zd0eee
feed!d"�d#d$�Ze
d
�d%d&�Zeeed'�d(d)�Zdd
�d*d+�Zdd
�d,d-�ZdS)1rzInformation flow analysis.�_exclude�_min_weight�	_perm_maprN)�policy�perm_map�
min_weight�exclude�booleans�returncCs�t�t�|_||_||_||_||_||_d|_	d|_
zt��|_
|j
��|_Wn,ty||j�d�|j�d��Yn0dS)a�
        Parameters:
        policy      The policy to analyze.
        perm_map    The permission map or path to the permission map file.
        minweight   The minimum permission weight to include in the analysis.
                    (default is 1)
        exclude     The types excluded from the information flow analysis.
                    (default is none)
        booleans    If None, all rules will be added to the analysis (default).
                    otherwise it should be set to a dict with keys corresponding
                    to boolean names and values of True/False. Any unspecified
                    booleans will use the policy's default values.
        TzKNetworkX is not available.  This is requried for Information Flow Analysis.z2This is typically in the python3-networkx package.N)�logging�	getLogger�__name__�logrrrrr�rebuildgraph�rebuildsubgraph�nxZDiGraph�G�copy�subG�	NameErrorZcritical)�selfrrrrr�r+�6/usr/lib64/python3.9/site-packages/setools/infoflow.py�__init__!s
zInfoFlowAnalysis.__init__)rcCs|jS�N)r�r*r+r+r,rEszInfoFlowAnalysis.min_weight)�weightrcCs.d|krdksntd��||_d|_dS)Nr�
z4Min information flow weight must be an integer 1-10.T)�
ValueErrorrr$)r*r0r+r+r,rIs�cCs|jSr.)rr/r+r+r,rRszInfoFlowAnalysis.perm_map)rrcCs||_d|_d|_dS)NT)rr#r$)r*rr+r+r,rVscCs|jSr.)rr/r+r+r,r\szInfoFlowAnalysis.exclude)�typesrcs*|r�fdd�|D��_ng�_d�_dS)Ncsg|]}�j�|��qSr+)r�lookup_type)�.0�tr/r+r,�
<listcomp>c�z,InfoFlowAnalysis.exclude.<locals>.<listcomp>T)rr$)r*r3r+r/r,r`s)�source�targetrccs�|j�|�}|j�|�}|jr&|��|j�d�||��ttt	��*|�
tj|j
||d��VWd�n1st0YdS)a
        Generator which yields one shortest path between the source
        and target types (there may be more).

        Parameters:
        source   The source type.
        target   The target type.

        Yield: generator(steps)

        steps Yield: tuple(source, target, rules)

        source   The source type for this step of the information flow.
        target   The target type for this step of the information flow.
        rules    The list of rules creating this information flow step.
        z@Generating one shortest information flow path from {0} to {1}...)r9r:N)rr4r$�_build_subgraphr"�info�formatrr
r�!_InfoFlowAnalysis__generate_stepsr%�
shortest_pathr()r*r9r:�sr6r+r+r,r?is
�zInfoFlowAnalysis.shortest_path�)r9r:�maxlenrccs�|dkrtd��|j�|�}|j�|�}|jr6|��|j�d�|||��tt	t
��4t�|j
|||�D]}|�|�VqjWd�n1s�0YdS)a�
        Generator which yields all paths between the source and target
        up to the specified maximum path length.  This algorithm
        tends to get very expensive above 3-5 steps, depending
        on the policy complexity.

        Parameters:
        source    The source type.
        target    The target type.
        maxlen    Maximum length of paths.

        Yield: generator(steps)

        steps Yield: tuple(source, target, rules)

        source    The source type for this step of the information flow.
        target    The target type for this step of the information flow.
        rules     The list of rules creating this information flow step.
        rz%Maximum path length must be positive.zHGenerating all information flow paths from {0} to {1}, max length {2}...N)r2rr4r$r;r"r<r=rr
rr%Zall_simple_pathsr(r>)r*r9r:rBr@r6�pathr+r+r,�	all_paths�s
�zInfoFlowAnalysis.all_pathsccs�|j�|�}|j�|�}|jr&|��|j�d�||��ttt	��2t
�|j||�D]}|�
|�VqVWd�n1s|0YdS)a�
        Generator which yields all shortest paths between the source
        and target types.

        Parameters:
        source   The source type.
        target   The target type.

        Yield: generator(steps)

        steps Yield: tuple(source, target, rules)

        source   The source type for this step of the information flow.
        target   The target type for this step of the information flow.
        rules    The list of rules creating this information flow step.
        zAGenerating all shortest information flow paths from {0} to {1}...N)rr4r$r;r"r<r=rr
rr%�all_shortest_pathsr(r>)r*r9r:r@r6rCr+r+r,rE�s
�z#InfoFlowAnalysis.all_shortest_pathsTr)�type_�outrccs�|j�|�}|jr|��|j�d�|r,dnd|��tt��L|rR|j	�
|�}n|j	�|�}|D]\}}t|j	||�VqbWd�n1s�0YdS)a(
        Generator which yields all information flows in/out of a
        specified source type.

        Parameters:
        source  The starting type.

        Keyword Parameters:
        out     If true, information flows out of the type will
                be returned.  If false, information flows in to the
                type will be returned.  Default is true.

        Yield: generator(steps)

        steps   A generator that returns the tuple of
                source, target, and rules for each
                information flow.
        z(Generating all information flows {0} {1}zout ofZintoN)
rr4r$r;r"r<r=rr	r(Z	out_edgesZin_edgesr)r*rFrGr@Zflowsr9r:r+r+r,�	infoflows�s
�
zInfoFlowAnalysis.infoflowscCs.|jr|��dt�|j��dt�|j���S)zQ
        Get the information flow graph statistics.

        Return: str
        z
Graph nodes: z
Graph edges: )r#�_build_graphr%�number_of_nodesr&�number_of_edgesr/r+r+r,�	get_stats�s

�zInfoFlowAnalysis.get_stats)rCrccs4tdt|��D] }t|j||d||�VqdS)a�
        Generator which returns the source, target, and associated rules
        for each information flow step.

        Parameter:
        path   A list of graph node names representing an information flow path.

        Yield: tuple(source, target, rules)

        source  The source type for this step of the information flow.
        target  The target type for this step of the information flow.
        rules   The list of rules creating this information flow step.
        rN)�range�lenrr()r*rCr@r+r+r,Z__generate_stepssz!InfoFlowAnalysis.__generate_stepscCs*|j��d�|j�|j_|j�|j�|j�d�|j��|j�	�D]�}|j
tjkrXqF|j�
tt|��\}}t�|j��|j���D]`\}}||kr�|r�t|j||dd�}|j�|�||_|r�t|j||dd�}|j�|�||_q�qFd|_d|_|j�d�|j�d�t�|j�t�|j���dS)NzInformation flow graph for {0}.z+Building information flow graph from {0}...T)�createFz*Completed building information flow graph.z$Graph stats: nodes: {0}, edges: {1}.)r&�clearr=r�namerZ
map_policyr"r<ZterulesZruletyperZallowZrule_weightrr�	itertools�productr9�expandr:r�rules�appendr0r#r$�debugr%rJrK)r*�ruleZrweightZwweightr@r6�edger+r+r,rI.s2
 



�zInfoFlowAnalysis._build_graphc	s��jr����j�d��j�d��j���j�d��j���j�d��jdu���fdd��j	�
�D�}�j	�|����_
�jdkr�g}�j
��D],\}}t�j
||�}|j�jkr�|�|�q��j
�|��jdu�r�g}�j
��D]�\}}t�j
||�}g}|jD]$}|jfi�j���s|�|��qg}|D]&}||v�r>|j�|�|�|��q>|js�|�|�q�j
�|�d�_�j�d	��j�d
�t��j
�t��j
���dS)Nz%Building information flow subgraph...zExcluding {0!r}zMin weight {0}z(Exclude disabled conditional policy: {0}csg|]}|�jvr|�qSr+)r)r5�nr/r+r,r7\r8z4InfoFlowAnalysis._build_subgraph.<locals>.<listcomp>rFz-Completed building information flow subgraph.z'Subgraph stats: nodes: {0}, edges: {1}.)r#rIr"r<rWr=rrrr&�nodesZsubgraphr'r(Zedgesrr0rVZremove_edges_fromrUZenabled�remover$r%rJrK)	r*r[Zdelete_listr@r6rYZ	rule_listrXZ
deleted_rulesr+r/r,r;QsN
�





�z InfoFlowAnalysis._build_subgraph)rNN)rA)T)r!�
__module__�__qualname__�__doc__rr�__annotations__�intrrrrr�strr�boolr-�propertyr�setterrr�InfoFlowPathr?rDrErHrLr>rIr;r+r+r+r,rsF
��$""�)�# ' #c@sFeZdZdZed�Zed�Zd
eee	dd�dd�Z
d	d
�Zdd�ZdS)raR
    A graph edge.  Also used for returning information flow steps.

    Parameters:
    graph       The NetworkX graph.
    source      The source type of the edge.
    target      The target type of the edge.

    Keyword Parameters:
    create      (T/F) create the edge if it does not exist.
                The default is False.
    rUZcapacityFN)r9r:rOrcCsP||_||_||_|j�||�sL|rD|jj||dd�d|_d|_ntd��dS)Nr)r0z$InfoFlowStep does not exist in graph)r&r9r:Zhas_edgeZadd_edgerUr0r2)r*Zgraphr9r:rOr+r+r,r-�szInfoFlowStep.__init__cs4t|t�r&�fdd�t|�d��D�S��|�SdS)Ncsg|]}��|��qSr+)�_index_to_item)r5�ir/r+r,r7�r8z,InfoFlowStep.__getitem__.<locals>.<listcomp>rA)�
isinstance�slicerM�indicesrg)r*�keyr+r/r,�__getitem__�s
zInfoFlowStep.__getitem__cCs.|dkr|jS|dkr|jStd�|���dS)z'Return source or target based on index.rrz,Invalid index (edges only have 2 items): {0}N)r9r:�
IndexErrorr=)r*�indexr+r+r,rg�s
zInfoFlowStep._index_to_item)F)
r!r]r^r_rrUr
r0rrcr-rmrgr+r+r+r,r�s

)#rRr�
contextlibr�typingrrrrrrZnetworkxr%Znetworkx.exceptionr	r
r�ImportErrorr r!rWZdescriptorsr
rZpermmaprZ	policyreprrrr�__all__rfrrr+r+r+r,�<module>s" r

Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]

Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
17 Jan 2026 3.14 PM
root / root
0755
__init__.cpython-39.opt-1.pyc
3.668 KB
3 Apr 2024 4.13 PM
root / root
0644
__init__.cpython-39.pyc
3.668 KB
3 Apr 2024 4.13 PM
root / root
0644
boolquery.cpython-39.opt-1.pyc
2.052 KB
3 Apr 2024 4.13 PM
root / root
0644
boolquery.cpython-39.pyc
2.052 KB
3 Apr 2024 4.13 PM
root / root
0644
boundsquery.cpython-39.opt-1.pyc
1.839 KB
3 Apr 2024 4.13 PM
root / root
0644
boundsquery.cpython-39.pyc
1.839 KB
3 Apr 2024 4.13 PM
root / root
0644
categoryquery.cpython-39.opt-1.pyc
1.643 KB
3 Apr 2024 4.13 PM
root / root
0644
categoryquery.cpython-39.pyc
1.643 KB
3 Apr 2024 4.13 PM
root / root
0644
commonquery.cpython-39.opt-1.pyc
1.867 KB
3 Apr 2024 4.13 PM
root / root
0644
commonquery.cpython-39.pyc
1.867 KB
3 Apr 2024 4.13 PM
root / root
0644
constraintquery.cpython-39.opt-1.pyc
4.646 KB
3 Apr 2024 4.13 PM
root / root
0644
constraintquery.cpython-39.pyc
4.646 KB
3 Apr 2024 4.13 PM
root / root
0644
defaultquery.cpython-39.opt-1.pyc
2.308 KB
3 Apr 2024 4.13 PM
root / root
0644
defaultquery.cpython-39.pyc
2.308 KB
3 Apr 2024 4.13 PM
root / root
0644
descriptors.cpython-39.opt-1.pyc
9.883 KB
3 Apr 2024 4.13 PM
root / root
0644
descriptors.cpython-39.pyc
10.071 KB
3 Apr 2024 4.13 PM
root / root
0644
devicetreeconquery.cpython-39.opt-1.pyc
2.529 KB
3 Apr 2024 4.13 PM
root / root
0644
devicetreeconquery.cpython-39.pyc
2.529 KB
3 Apr 2024 4.13 PM
root / root
0644
dta.cpython-39.opt-1.pyc
15.247 KB
3 Apr 2024 4.13 PM
root / root
0644
dta.cpython-39.pyc
15.247 KB
3 Apr 2024 4.13 PM
root / root
0644
exception.cpython-39.opt-1.pyc
9.104 KB
3 Apr 2024 4.13 PM
root / root
0644
exception.cpython-39.pyc
9.104 KB
3 Apr 2024 4.13 PM
root / root
0644
fsusequery.cpython-39.opt-1.pyc
2.971 KB
3 Apr 2024 4.13 PM
root / root
0644
fsusequery.cpython-39.pyc
2.971 KB
3 Apr 2024 4.13 PM
root / root
0644
genfsconquery.cpython-39.opt-1.pyc
3.199 KB
3 Apr 2024 4.13 PM
root / root
0644
genfsconquery.cpython-39.pyc
3.199 KB
3 Apr 2024 4.13 PM
root / root
0644
ibendportconquery.cpython-39.opt-1.pyc
3.272 KB
3 Apr 2024 4.13 PM
root / root
0644
ibendportconquery.cpython-39.pyc
3.272 KB
3 Apr 2024 4.13 PM
root / root
0644
ibpkeyconquery.cpython-39.opt-1.pyc
4.651 KB
3 Apr 2024 4.13 PM
root / root
0644
ibpkeyconquery.cpython-39.pyc
4.651 KB
3 Apr 2024 4.13 PM
root / root
0644
infoflow.cpython-39.opt-1.pyc
12.741 KB
3 Apr 2024 4.13 PM
root / root
0644
infoflow.cpython-39.pyc
12.741 KB
3 Apr 2024 4.13 PM
root / root
0644
initsidquery.cpython-39.opt-1.pyc
2.557 KB
3 Apr 2024 4.13 PM
root / root
0644
initsidquery.cpython-39.pyc
2.557 KB
3 Apr 2024 4.13 PM
root / root
0644
iomemconquery.cpython-39.opt-1.pyc
4 KB
3 Apr 2024 4.13 PM
root / root
0644
iomemconquery.cpython-39.pyc
4 KB
3 Apr 2024 4.13 PM
root / root
0644
ioportconquery.cpython-39.opt-1.pyc
4.004 KB
3 Apr 2024 4.13 PM
root / root
0644
ioportconquery.cpython-39.pyc
4.004 KB
3 Apr 2024 4.13 PM
root / root
0644
mixins.cpython-39.opt-1.pyc
6.784 KB
3 Apr 2024 4.13 PM
root / root
0644
mixins.cpython-39.pyc
6.784 KB
3 Apr 2024 4.13 PM
root / root
0644
mlsrulequery.cpython-39.opt-1.pyc
3.213 KB
3 Apr 2024 4.13 PM
root / root
0644
mlsrulequery.cpython-39.pyc
3.213 KB
3 Apr 2024 4.13 PM
root / root
0644
netifconquery.cpython-39.opt-1.pyc
2.633 KB
3 Apr 2024 4.13 PM
root / root
0644
netifconquery.cpython-39.pyc
2.633 KB
3 Apr 2024 4.13 PM
root / root
0644
nodeconquery.cpython-39.opt-1.pyc
3.938 KB
3 Apr 2024 4.13 PM
root / root
0644
nodeconquery.cpython-39.pyc
3.938 KB
3 Apr 2024 4.13 PM
root / root
0644
objclassquery.cpython-39.opt-1.pyc
3.113 KB
3 Apr 2024 4.13 PM
root / root
0644
objclassquery.cpython-39.pyc
3.113 KB
3 Apr 2024 4.13 PM
root / root
0644
pcideviceconquery.cpython-39.opt-1.pyc
2.92 KB
3 Apr 2024 4.13 PM
root / root
0644
pcideviceconquery.cpython-39.pyc
2.92 KB
3 Apr 2024 4.13 PM
root / root
0644
permmap.cpython-39.opt-1.pyc
12.52 KB
3 Apr 2024 4.13 PM
root / root
0644
permmap.cpython-39.pyc
12.748 KB
3 Apr 2024 4.13 PM
root / root
0644
pirqconquery.cpython-39.opt-1.pyc
2.844 KB
3 Apr 2024 4.13 PM
root / root
0644
pirqconquery.cpython-39.pyc
2.844 KB
3 Apr 2024 4.13 PM
root / root
0644
polcapquery.cpython-39.opt-1.pyc
1.447 KB
3 Apr 2024 4.13 PM
root / root
0644
polcapquery.cpython-39.pyc
1.447 KB
3 Apr 2024 4.13 PM
root / root
0644
portconquery.cpython-39.opt-1.pyc
4.642 KB
3 Apr 2024 4.13 PM
root / root
0644
portconquery.cpython-39.pyc
4.642 KB
3 Apr 2024 4.13 PM
root / root
0644
query.cpython-39.opt-1.pyc
1.242 KB
3 Apr 2024 4.13 PM
root / root
0644
query.cpython-39.pyc
1.242 KB
3 Apr 2024 4.13 PM
root / root
0644
rbacrulequery.cpython-39.opt-1.pyc
4.25 KB
3 Apr 2024 4.13 PM
root / root
0644
rbacrulequery.cpython-39.pyc
4.25 KB
3 Apr 2024 4.13 PM
root / root
0644
rolequery.cpython-39.opt-1.pyc
2.139 KB
3 Apr 2024 4.13 PM
root / root
0644
rolequery.cpython-39.pyc
2.139 KB
3 Apr 2024 4.13 PM
root / root
0644
sensitivityquery.cpython-39.opt-1.pyc
2.346 KB
3 Apr 2024 4.13 PM
root / root
0644
sensitivityquery.cpython-39.pyc
2.346 KB
3 Apr 2024 4.13 PM
root / root
0644
terulequery.cpython-39.opt-1.pyc
6.546 KB
3 Apr 2024 4.13 PM
root / root
0644
terulequery.cpython-39.pyc
6.546 KB
3 Apr 2024 4.13 PM
root / root
0644
typeattrquery.cpython-39.opt-1.pyc
2.297 KB
3 Apr 2024 4.13 PM
root / root
0644
typeattrquery.cpython-39.pyc
2.297 KB
3 Apr 2024 4.13 PM
root / root
0644
typequery.cpython-39.opt-1.pyc
3.072 KB
3 Apr 2024 4.13 PM
root / root
0644
typequery.cpython-39.pyc
3.072 KB
3 Apr 2024 4.13 PM
root / root
0644
userquery.cpython-39.opt-1.pyc
3.926 KB
3 Apr 2024 4.13 PM
root / root
0644
userquery.cpython-39.pyc
3.926 KB
3 Apr 2024 4.13 PM
root / root
0644
util.cpython-39.opt-1.pyc
7.542 KB
3 Apr 2024 4.13 PM
root / root
0644
util.cpython-39.pyc
7.542 KB
3 Apr 2024 4.13 PM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF