golden hour
/lib64/python2.7/site-packages/sepolgen
⬆️ Go Up
Upload
File/Folder
Size
Actions
__init__.py
0 B
Del
OK
__init__.pyc
142 B
Del
OK
__init__.pyo
142 B
Del
OK
access.py
12.33 KB
Del
OK
access.pyc
13.18 KB
Del
OK
access.pyo
13.18 KB
Del
OK
audit.py
23.64 KB
Del
OK
audit.pyc
22.33 KB
Del
OK
audit.pyo
22.33 KB
Del
OK
classperms.py
2.75 KB
Del
OK
classperms.pyc
3.16 KB
Del
OK
classperms.pyo
3.16 KB
Del
OK
defaults.py
2.69 KB
Del
OK
defaults.pyc
2.87 KB
Del
OK
defaults.pyo
2.87 KB
Del
OK
interfaces.py
16.21 KB
Del
OK
interfaces.pyc
15.86 KB
Del
OK
interfaces.pyo
15.86 KB
Del
OK
lex.py
32.86 KB
Del
OK
lex.pyc
19.24 KB
Del
OK
lex.pyo
19.24 KB
Del
OK
matching.py
8.45 KB
Del
OK
matching.pyc
7.4 KB
Del
OK
matching.pyo
7.4 KB
Del
OK
module.py
7.12 KB
Del
OK
module.pyc
8.4 KB
Del
OK
module.pyo
8.4 KB
Del
OK
objectmodel.py
6.37 KB
Del
OK
objectmodel.pyc
4.64 KB
Del
OK
objectmodel.pyo
4.64 KB
Del
OK
output.py
5.01 KB
Del
OK
output.pyc
4.51 KB
Del
OK
output.pyo
4.51 KB
Del
OK
policygen.py
16.31 KB
Del
OK
policygen.pyc
15.25 KB
Del
OK
policygen.pyo
15.18 KB
Del
OK
refparser.py
30.2 KB
Del
OK
refparser.pyc
36.27 KB
Del
OK
refparser.pyo
36.27 KB
Del
OK
refpolicy.py
27.31 KB
Del
OK
refpolicy.pyc
46.45 KB
Del
OK
refpolicy.pyo
46.45 KB
Del
OK
sepolgeni18n.py
912 B
Del
OK
sepolgeni18n.pyc
410 B
Del
OK
sepolgeni18n.pyo
410 B
Del
OK
util.py
5.41 KB
Del
OK
util.pyc
7.87 KB
Del
OK
util.pyo
7.87 KB
Del
OK
yacc.py
80.04 KB
Del
OK
yacc.pyc
41.4 KB
Del
OK
yacc.pyo
41.4 KB
Del
OK
Edit: audit.pyo
� 1+^c @ sL d d l Z d d l Z d d l m Z d d l m Z d d l m Z d � Z d � Z d � Z d f d � � YZ d e f d � � YZ d e f d � � YZ d d l j Z i Z d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d f d � � YZ d f d � � YZ d f d � � YZ d S( i����Ni ( t refpolicy( t access( t utilc C s� d d l } d d l } t d d � } t | j � j � d � } | j | j | j � | � } | j d | � } | j d | � } | j d d d d | | g d | j �j � d } t j r� t j | � } n | S( s Obtain all of the avc and policy load messages from the audit log. This function uses ausearch and requires that the current process have sufficient rights to run ausearch. Returns: string contain all of the audit messages returned by ausearch. i����Ns /proc/uptimet ri s %xs %Xs /sbin/ausearchs -ms5 AVC,USER_AVC,MAC_POLICY_LOAD,DAEMON_START,SELINUX_ERRs -tst stdout( t subprocesst timet opent floatt readt splitt closet localtimet strftimet Popent PIPEt communicateR t PY3t decode_input( R R t fdt offt st bootdatet boottimet output( ( s4 /usr/lib64/python2.7/site-packages/sepolgen/audit.pyt get_audit_boot_msgs s c C sV d d l } | j d d d g d | j �j � d } t j rR t j | � } n | S( s Obtain all of the avc and policy load messages from the audit log. This function uses ausearch and requires that the current process have sufficient rights to run ausearch. Returns: string contain all of the audit messages returned by ausearch. i����Ns /sbin/ausearchs -ms5 AVC,USER_AVC,MAC_POLICY_LOAD,DAEMON_START,SELINUX_ERRR i ( R R R R R R R ( R R ( ( s4 /usr/lib64/python2.7/site-packages/sepolgen/audit.pyt get_audit_msgs2 s c C sP d d l } | j d g d | j �j � d } t j rL t j | � } n | S( s� Obtain all of the avc and policy load messages from /bin/dmesg. Returns: string contain all of the audit messages returned by dmesg. i����Ns /bin/dmesgR i ( R R R R R R R ( R R ( ( s4 /usr/lib64/python2.7/site-packages/sepolgen/audit.pyt get_dmesg_msgsA s t AuditMessagec B s e Z d Z d � Z d � Z RS( s� Base class for all objects representing audit messages. AuditMessage is a base class for all audit messages and only provides storage for the raw message (as a string) and a parsing function that does nothing. c C s | | _ d | _ d S( Nt ( t messaget header( t selfR ( ( s4 /usr/lib64/python2.7/site-packages/sepolgen/audit.pyt __init__W s c C sz xs | D]k } | j d � } t | � d k rQ | d d k r | | _ d Sq n | d d k r | d | _ d Sq Wd S( s� Parse a string that has been split into records by space into an audit message. This method should be overridden by subclasses. Error reporting should be done by raise ValueError exceptions. t =i i s audit(Ni t msgi ( R t lenR ( R t recsR# t fields( ( s4 /usr/lib64/python2.7/site-packages/sepolgen/audit.pyt from_split_string[ s ( t __name__t __module__t __doc__R! R'