404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.149.231.125: ~ $
3

El�f��@s&ddlZddlZddlZdZdZdddddd	d
ddg	Zd
Zy:ddlZiZej	d#krZded<ej
efddd�e��WnJyddlZeej
d<Wn&ek
r�ddlZeej
d<YnXYnXdd�Zd$dd�Zd%dd�Zd&dd�Zdad'dd�Zd(dd	�Zdd
�Zd)dd �Zd!d�Zd*d"d�ZdS)+�Nz_admin$z_role$�get_all_interfaces�get_interfaces_from_xml�	get_admin�get_user�get_interface_dict�get_interface_format_text�!get_interface_compile_format_text�get_xml_file�interface_compile_testzselinux-python�T�unicodez/usr/share/localezutf-8)Z	localedirZcodeset�_cCs,g}t|�}x|j�D]}|j|�qW|S)z' Get all interfaces from given xml file)r�keys�append)�pathZinterfaces_list�idict�k�r�/usr/lib/python3.6/interface.pyr4s
�cCs0ddlm}g}|s|�}nt|�}t|�}|S)Nr)�get_methods)�sepolicyrr	r)rrZall_interfaces�xml_pathrrrr=scCs�g}|r�y:t|�}t|�}x$|j�D]}|jd�r$|j|�q$WWq�tk
r�}z,tjjd|j	j
t|�f�tjd�WYdd}~Xq�Xn0x.t
j�D]"}|jd�r�|j|jd�d�q�W|S)z? Get all domains with an admin interface from installed policy.Z_adminz%s: %s
�Nr)r	rr�endswithr�IOError�sys�stderr�write�	__class__�__name__�str�exitrr�split)rZ
admin_listrrr�e�irrrrIs

cCs�g}|r�yRt|�}t|�}x<|j�D]0}|jd�r$d|dd	�tj�kr$|j|�q$WWq�tk
r�}z,tj	j
d|jjt
|�f�tjd�WYdd}~Xq�XnPxNtj�D]B}tjdt|�}t|�dkr�d|dtj�kr�|j|d�q�W|S)
z1 Get all domains with SELinux user role interfaceZ_rolez	%s_exec_tN�z%s: %s
rz(.*)%sr���)r	rrrrZ
get_all_typesrrrrrrr r!r"r�re�findall�USER_TRANSITION_INTERFACE�len)rZ
trans_listrrrr$r%�mrrrr_s$
�#/usr/share/selinux/devel/policy.xmlc

CsXddl}ddl}trtSiag}d}||7}|d7}�y|jj|�rT|jjj|�}n|jjj|�}x�|j	d�D]�}x�|j	d�D]�}xV|j
d�D]H}x"|j	d�D]}	|j|	jd��q�W||j
d	�jdgt|jd�<g}q�WxV|j
d
�D]H}x"|j	d�D]}	|j|	jd��q�W||j
d	�jd
gt|jd�<g}q�Wq~WqnWWntk
�rRYnXtS)NrzZ<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<policy>
<layer name="admin">
z
</layer>
</policy>
Zlayer�module�	interfaceZparam�nameZsummary�template)�osZxml.etree.ElementTree�interface_dictr�isfileZetreeZElementTree�parseZ
fromstringr)Zgetiteratorr�get�find�textr)
rr2ZxmlZ
param_listrZtree�lr,r%r$rrrrzs:cCs<t|�}d|dj||d�dj||djd��f}|S)Nz	%s(%s) %sz, r� r�
)r�joinr#)r/rr�interface_textrrrr�s0cCsLddlm}g}x6||dD]&}|j|j|�d|dj|�f}qW|S)Nr)�test_modulerz%s(%s)
z, )�	templatesr>r�dict_valuesr<)Zinterfaces_dictr/r>Z	param_tmpr%r=rrrr�s�compiletestcCs6ddlm}d}|tjd||j�7}|t||�7}|S)Nr)r>rZTEMPLATETYPE)r?r>r(�subZte_test_moduler)r/rr0r>�terrr�generate_compile_te�s
rDcCs�ddl}yddlm}Wn tk
r8ddlm}YnX|jj|�d}|jj|�jd�d}|d||�\}}|dkr�t	j
jd�t	j
jd|�t	jd	�n|SdS)
z; Returns xml format of interfaces for given .if policy filerN)�getstatusoutput�/�.zDpython /usr/share/selinux/devel/include/support/segenxml.py -w -m %sz-
 Could not proceed selected interface file.
z
%sr)
r2�commandsrE�ImportError�
subprocessr�dirname�basenamer#rrrr")Zif_filer2rEZbasedir�filename�rc�outputrrrr	�sc
Cs�dddddg}dg}yddlm}Wn tk
rDddlm}YnXddl}d	d
ddd
�}t|�}|jd�d|kp�||d|k�sjttd�|�yft	|dd�}|j
t||��|j�|d|d�\}	}
|	dkr�t
jj
|
�t
jj
td�|�Wn<tk
�r:}zt
jj
td�||f�WYdd}~XnXx@|j�D]}|jj|��rF|j|��qFWnt
jj
td�|�dS)NZuserdomZkernelZcorenet�filesZdevr1r)rEzcompiletest.ppzcompiletest.tezcompiletest.fczcompiletest.if)�pprCZfc�ifr
�zCompiling %s interfacerC�wz,make -f /usr/share/selinux/devel/Makefile %srQz
Compile test for %s failed.
z%
Compile test for %s has not run. %s
z,
Compiling of %s interface is not supported.)rHrErIrJr2rr#�printr
�openrrD�closerr�EnvironmentError�valuesr�exists�remove)
r/rZexclude_interfacesZexclude_interface_typerEr2Zpolicy_filesr�fdrNrOr$�vrrrr
�s2$*)r)r)r)r)r-)r-)rA)r-)r(rrZADMIN_TRANSITION_INTERFACEr*�__all__ZPROGNAME�gettext�kwargs�version_infoZinstall�builtinsr!�__dict__rIZ__builtin__rrrrrr3rrrrDr	r
rrrr�<module>sB
	



*


	

Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 30.88 KB 0644
__init__.cpython-36.pyc File 30.88 KB 0644
booleans.cpython-36.opt-1.pyc File 962 B 0644
booleans.cpython-36.pyc File 962 B 0644
communicate.cpython-36.opt-1.pyc File 1.17 KB 0644
communicate.cpython-36.pyc File 1.17 KB 0644
generate.cpython-36.opt-1.pyc File 42.62 KB 0644
generate.cpython-36.pyc File 42.62 KB 0644
gui.cpython-36.opt-1.pyc File 82.08 KB 0644
gui.cpython-36.pyc File 82.08 KB 0644
interface.cpython-36.opt-1.pyc File 5.77 KB 0644
interface.cpython-36.pyc File 5.77 KB 0644
manpage.cpython-36.opt-1.pyc File 34.85 KB 0644
manpage.cpython-36.pyc File 34.85 KB 0644
network.cpython-36.opt-1.pyc File 1.6 KB 0644
network.cpython-36.pyc File 1.6 KB 0644
sedbus.cpython-36.opt-1.pyc File 2.29 KB 0644
sedbus.cpython-36.pyc File 2.29 KB 0644
transition.cpython-36.opt-1.pyc File 2.9 KB 0644
transition.cpython-36.pyc File 2.9 KB 0644