%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/beacons/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/beacons/sh.pyo

�
���^c@@s�dZddlmZmZddlZddlZddlZddlZddl	ZdZ
eje�Z
d�Zd�Zd�Zd�ZdS(	uP
Watch the shell commands being executed actively. This beacon requires strace.
i(tabsolute_importtunicode_literalsNushcC@stjjjd�rtStS(u*
    Only load if strace is installed
    ustrace(tsalttutilstpathtwhicht__virtualname__tFalse(((s3/usr/lib/python2.7/site-packages/salt/beacons/sh.pyt__virtual__scC@sptj�}dtkrM|tddkr9|td<qhtd�td<n|td<td�td<tdS(u0
    Return the valid shells on this system
    ush.last_shellsiu
cmd.shellsu	sh.shells(ttimet__context__t__salt__(tstart((s3/usr/lib/python2.7/site-packages/salt/beacons/sh.pyt_get_shellss

cC@s#t|t�stdfStdfS(u+
    Validate the beacon configuration
    u+Configuration for sh beacon must be a list.uValid beacon configuration(t
isinstancetlistRtTrue(tconfig((s3/usr/lib/python2.7/site-packages/salt/beacons/sh.pytvalidate-s
c@s�g}d}t�}td��g}x=�D]5�t��fd�|D��r/|j��q/q/W|tkr�it|<nx�|D]���t|kr�dddddd	j��g}it|�<tjjj	|d
t
dt
dtd
t�t|�d<��jd�t|�d<q�q�Wx�t
t|�D]��d}d}xjt|�djr�t|�dj�\}}	|	s�Pn|tjjj|p�d�7}||	7}qRWx�|jd�D]�}
igd6�d6}d|
kr�|
jd�djd�}xZt|�D]L\}
}|
dkrC||d<qn|
ddkr|dj|�qqWt|�d|d<|j|�q�q�Wt|�dj�s=t|�dj�t|j��q=q=W|S(u�
    Scan the shell execve routines. This beacon will convert all login shells

    .. code-block:: yaml

        beacons:
          sh: []
    ush.vtustatus.procsc3@s4|]*}��jdd�jd�|kVqdS(ucmduu-N(tgettlstrip(t.0tshell(tpidtps_out(s3/usr/lib/python2.7/site-packages/salt/beacons/sh.pys	<genexpr>Fsustraceu-fu-euexecveu-pu{0}t
log_stdoutt
log_stderrt
stream_stdoutt
stream_stderruvtuuseruu
uargsutagiu"ucmdii(R
RtanytappendR
tformatRRtvttTerminalRRRRthas_unread_datatrecvtstringutilst
to_unicodetsplitt	enumeratetisalivetclosetpop(Rtrettpkeytshellst
track_pidstcmdtoutterrttouttterrtlineteventtcompstindtfield((RRs3/usr/lib/python2.7/site-packages/salt/beacons/sh.pytbeacon7s^		



!&


(t__doc__t
__future__RRtloggingR	tsalt.utils.pathRtsalt.utils.stringutilst
salt.utils.vtRt	getLoggert__name__tlogRR
RR9(((s3/usr/lib/python2.7/site-packages/salt/beacons/sh.pyt<module>s			

Zerion Mini Shell 1.0