[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.226.98.244: ~ $
U

�=�_]y�@s�dZddlZddlZddlZddlZddlmmZddl	m
Z
ddl	mZddlm
Z
ddlmZddlmZdd	lmZdd
l
mZddl
mZddl
mZdd
l
mZddl
mZddl
mZddl
mZddl
mZddl
mZddl
mZddl
mZddlmZddlm Z ddlm!Z!ddlm"Z"gZ#e�rzej$e
j%ej&e
j'ej(e
j)ej*e
j+ej,e
j-ej.e
j/ej0e
j1iZ2n~e�r�ej$e
j%ej(e
j)ej*e
j+ej3e
j-ej,e
j-ej&e
j4ej5e
j'iZ2n:e�r�ej$e
j%ej(e
j)ej*e
j+ej,e
j-ej&e
j4ej5e
j'iZ2ej6e
j7ej8e
j9ej:e
j;ej<e
j=ej>e
j?ej@e
jAejBe
jCejDe
jEejFe
jGejHe
jIejJe
jKejLe
jMiZNe�O�ZPejQZQeRed�ZSeRed�ZTeRed�ZUeRed�ZVeWdddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4�ZXe
d5d6d7d8d9d:d;d<d=d>d?d@g�ZYe
dAdBdCdDdEdFg�ZZe
dGdHdIdJdKdLg�Z[e[Z\e
dMdBdDdNdOg�Z]e
dPdQ�Z^e
dRdS�Z_e�r^e
dTdUdVdWdXdYdZd[g�Z`ne
dTdUdVdWdXg�Z`d\d]�Zad^d_�Zbd`da�ZceS�r�dbd�Zdndcd�Zddded_ededf�Zfe�s�e�r�dgdh�Zgndidh�Zgdjdk�Zhd�dldm�ZiejjZjejkZkejlZlejmZmdndo�Zndpdq�Zoe�r$drds�Zpdtdu�Zqdvdw�Zrdxdy�Zsdzd{�Zted|d}��Zud~d�Zve�sTe�r^d�d��ZwnejwZwd�d��Zxd�d��Zyejzd�d���Z{Gd�d��d�e|�Z}dS)�z5FreeBSD, OpenBSD and NetBSD platforms implementation.�N)�
namedtuple)�defaultdict�)�_common)�_psposix)�_psutil_bsd)�
_psutil_posix)�AccessDenied)�	conn_tmap)�conn_to_ntuple)�FREEBSD)�memoize)�memoize_when_activated)�NETBSD)�
NoSuchProcess)�OPENBSD)�
usage_percent)�
ZombieProcess)�FileNotFoundError)�PermissionError)�ProcessLookupError)�which�
per_cpu_times�proc_num_threads�proc_open_files�proc_num_fds��������	�
���
�����������)�ppid�status�real_uid�
effective_uid�	saved_uid�real_gid�
effective_gid�	saved_gid�ttynr�create_time�ctx_switches_vol�ctx_switches_unvol�
read_io_count�write_io_count�	user_time�sys_time�ch_user_time�ch_sys_time�rss�vms�memtext�memdata�memstack�cpunum�name�svmem�totalZ	available�percent�used�free�active�inactive�buffers�cached�shared�wired�	scputimes�user�nice�system�idle�irq�pmemrErF�text�data�stack�	pcputimes�
children_user�children_system�
pmmap_grouped�*path rss, private, ref_count, shadow_count�	pmmap_ext�6addr, perms path rss, private, ref_count, shadow_count�sdiskioZ
read_countZwrite_countZ
read_bytesZwrite_bytesZ	read_timeZ
write_timeZ	busy_timecCs�t��}|\}}}}}}}}tr~tdd��N}	|	D]B}
|
�d�rTt|
��d�d}q0|
�d�r0t|
��d�d}q0W5QRX|||}|||}t|||dd�}
t|||
||||||||�S)z&System virtual memory as a namedtuple.z
/proc/meminfo�rbsBuffers:ris
MemShared:�Zround_)	�cextZvirtual_memr�open�
startswith�int�splitrrL)ZmemrMrPrQrRrVrTrSrU�f�lineZavailrOrN�rr�@/opt/alt/python38/lib64/python3.8/site-packages/psutil/_psbsd.py�virtual_memory�s(

 �rtcCs4t��\}}}}}t||dd�}t�||||||�S)z@System swap memory as (total, used, free, sin, sout) namedtuple.rrj)rkZswap_memrrZsswap)rMrOrPZsinZsoutrNrrrrrs�swap_memory�srucCs"t��\}}}}}t|||||�S)z+Return system per-CPU times as a namedtuple)rk�	cpu_timesrW)rXrYrZr[r\rrrrrsrv�srvcCs>g}t��D],}|\}}}}}t|||||�}|�|�q|S)�'Return system CPU times as a namedtuple)rkrrW�append)�retZcpu_trXrYrZr[r\�itemrrrrrsr�scCs.t�dkrt�gStjr td��dt_t�gS)rwr�&supported only starting from FreeBSD 8T)�cpu_count_logicalrvr�
__called__�NotImplementedErrorrrrrrrrsr�s
FcCst��S)z0Return the number of logical CPUs in the system.)rkr|rrrrrrrsr|�sr|cCst�dkrdSdS)Nr)r|rrrrrrrs�cpu_count_physical�srcCsxd}t��}|dk	rb|�d�}|dkrb|d|d�}t�|�}zt|�d��pRd}W5|��X|stt�dkrtdS|S)z1Return the number of physical CPUs in the system.Nz	</groups>���r#zgroup/children/group/cpur)	rkZcpu_count_phys�rfind�ETZ
fromstring�clear�len�findallr|)ry�s�index�rootrrrrrsrs



c		Cs�trt��\}}}}}nptrnt��\}}}}}}}tdd��*}|D]}|�d�rBt|��d�}qBW5QRXntr�t��\}}}}}}}t	�
||||�S)z*Return various CPU stats as a named tuple.z
/proc/statrisintrr)rrk�	cpu_statsrrlrmrnrorrZ	scpustats)	ZctxswZintrsZ
soft_intrsZsyscallsZtrapsZfaultsZforksrprqrrrrrsr�s�
�r�c	CsLg}t��}|D]6}|\}}}}d}}	t�||||||	�}
|�|
�q|S)z�Return mounted disk partitions as a list of namedtuples.
    'all' argument is ignored, see:
    https://github.com/giampaolo/psutil/issues/906
    N)rk�disk_partitionsrZ	sdiskpartrx)�all�retlistZ
partitions�	partitionZdeviceZ
mountpointZfstypeZoptsZmaxfileZmaxpath�ntuplerrrrrsr�?s�r�cCs�t���}i}|D]�}z&t�|�}t�|�}t�|�\}}Wn0tk
rl}z|jtjkr\�W5d}~XYqXt	t
d�r�t
�|�}t
�||||�||<q|S)z)Get NIC stats (isup, duplex, speed, mtu).N�	NicDuplex)
�net_io_counters�keys�
cext_posixZ
net_if_mtuZnet_if_is_runningZnet_if_duplex_speed�OSError�errnoZENODEV�hasattrrr�Z	snicstats)�namesryrKZmtuZisupZduplexZspeed�errrrrrrs�net_if_stats\s




r�c
Cstrtg}t�D]`}zt|��|�}Wnttfk
r@YqYqX|D]&}t|�}|�|�|�tj	|��qFq|S|tj
kr�td|d�dd�t
D��f��t
|\}}t
�}tr�t�d�}nt��}|D]F}|\}	}
}}}
}}|
|kr�||kr�t|	|
|||
|t|�}|�|�q�t|�S)z System-wide network connections.�+invalid %r kind argument; choose between %s�, cSsg|]}t|��qSrr��repr��.0�xrrrrrs�
<listcomp>�sz#net_connections.<locals>.<listcomp>r�)r�pids�Process�connectionsrr�listrxrZsconnr
�
ValueError�join�setrrk�net_connectionsr�TCP_STATUSES�add)�kindry�pidZconsZconn�families�types�rawlistrz�fd�fam�type�laddr�raddrr4�ntrrrrrsr�ps<



��r�cCsdzt��\}}}Wntk
r(YdSX|dk}|r>tj}n|dkrNtj}n|d}t�|||�S)zReturn battery info.Nrr��<)rk�sensors_batteryr~rZPOWER_TIME_UNLIMITEDZPOWER_TIME_UNKNOWNZsbattery)rNZminsleftZ
power_pluggedZsecsleftrrrrrsr��sr�c	Csvtt�}t�}t|�D]Z}z@t�|�\}}|dkr6d}d|}|d�t�||||��Wqt	k
rnYqXq|S)z?Return CPU cores temperatures if available, else an empty dict.rNzCore %sZcoretemp)
rr�r|�rangerkZsensors_cpu_temperaturerxrZshwtempr~)ry�num_cpus�cpu�currentZhighrKrrrrrs�sensors_temperatures�s�r�c
Cs�g}t�}t|�D]�}zt�|�\}}Wntk
r@YqYnX|r�z t|�d�d�d�d�}Wnttfk
r�d}YnXz t|�d�d�d�d�}Wnttfk
r�d}YnX|�	t
�|||��q|S)z�Return frequency metrics for CPUs. As of Dec 2018 only
        CPU 0 appears to be supported by FreeBSD and all other cores
        match the frequency of CPU 0.
        � r��/rN)r|r�rkZ
cpu_frequencyr~rnro�
IndexErrorr�rxrZscpufreq)ryr�r�r�Zavailable_freqZmin_freqZmax_freqrrrrrs�cpu_freq�s$
 
 
r�cCst��S)z:The system boot time expressed in seconds since the epoch.)rk�	boot_timerrrrrrrsr��sr�c	Csfg}t��}|D]P}|\}}}}}|dkr6ts2t�d}|dkr@qt�||pLd|||�}|�|�q|S)z:Return currently connected users as a list of namedtuples.r�N�~)rk�usersr�AssertionErrorrZsuserrx)	r�r�rzrXZttyZhostnameZtstampr�r�rrrrrsr��sr�cCsDztd���Wn*tk
r&YdStk
r:YdSXdSdS)NrFT)r�rKrr	rrrrrrrs�
_pid_0_exists�sr�cCs*t��}tr&d|kr&t�r&|�dd�|S)z7Returns a list of PIDs currently running on the system.r)rkr�rr��insert)ryrrrrrsr��sr�cCs t�|�}|s|t�kSdSdS)zReturn True if pid exists.TN)r�
pid_existsr�)r��existsrrrrrsr�
s

r�cCs:zt�|�td}|tjkWStk
r4YdSXdS)Nr4F)rk�proc_oneshot_info�kinfo_proc_map�SZOMB�	Exception)r��strrrrrs�	is_zombies
r�cst����fdd��}|S)z`Decorator which translates bare OSError exceptions into
    NoSuchProcess and AccessDenied.
    cs�z�|f|�|�WStk
rRt|j�r@t|j|j|j��nt|j|j��Yn\tk
rrt|j|j��Yn<t	k
r�|jdkr�dt
�kr�t|j|j��n��YnXdS�Nr)rr�r�r�_name�_ppidrrr	r�r�)�self�args�kwargs��funrrrs�wrapper#s


z wrap_exceptions.<locals>.wrapper)�	functools�wraps)r�r�rrr�rs�wrap_exceptionssr�c	cstz
dVWndttfk
rNt|j�r<t|j|j|j��nt|j|j��Yn"tk
rnt	|j|j��YnXdS)z8Same as above, for routines relying on reading /proc fs.N)
rrr�r�rr�r�rrr	)�instrrrrrs�wrap_exceptions_procfs8s

r�c@s�eZdZdZddddgZdd�Zdd	�Zeed
d���Z	dd
�Z
dd�Zedd��Zedd��Z
edd��Zedd��Zedd��Zedd��Zedd��Zedd��Zed d!��Zer�ed"d#��Zed$d%��ZeZed&d'��Zed(d)��Zed*d+��Zed,d-��ZedOd/d0��ZedPd2d3��Zed4d5��Zed6d7��Z ed8d9��Z!ed:d;��Z"ed<d=��Z#e$d>d?�Z%e$d>d@�Z&dAdB�Z'e(�r�edCdD��Z)ne'Z)e*�r�edEdF��Z+ne'Z+e�r�edGdH��Z,edIdJ��Z-edKdL��Z.edQdMdN��Z/d1S)Rr�z1Wrapper class around underlying C implementation.r�r�r��_cachecCs||_d|_d|_dS�N)r�r�r�)r�r�rrrrrs�__init__NszProcess.__init__cCst�|j�dS)z+Raise NSP if the process disappeared on us.N)rk�	proc_namer��r�rrrrrs�
_assert_aliveSszProcess._assert_alivecCs$t�|j�}t|�tt�ks t�|S)z;Retrieves multiple process info in one shot as a raw tuple.)rkr�r�r�r�r��r�ryrrrrrs�oneshotYszProcess.oneshotcCs|j�|�dSr�)r�Zcache_activater�rrrrrs�
oneshot_enteraszProcess.oneshot_entercCs|j�|�dSr�)r�Zcache_deactivater�rrrrrs�oneshot_exitdszProcess.oneshot_exitcCs(|��td}|dk	r|St�|j�S)NrK)r�r�rkr�r�)r�rKrrrrrsrKgszProcess.namec
Cs�tr|jdkrdSt�|j�Str^|jdkr0dSt|��t�d|j�W5QR�SQRXn |��}|rzt	|d�pxdSdSdS)Nr�z/proc/%s/exe)
rr�rkZproc_exerr��os�readlink�cmdliner)r�r�rrrrrs�exels


$zProcess.exec
Cs�tr|jdkrgStr�zt�|j�WStk
r�}z\|jtjkr�t|j�r`t	|j|j
|j��q�t|j�s~t
|j|j
|j��q�gWY�
Sn�W5d}~XYq�Xnt�|j�SdSr�)rr�rrkZproc_cmdliner�r��EINVALr�rr�r�r�r)r�r�rrrrrsr��s

zProcess.cmdlinecCst�|j�Sr�)rkZproc_environr�r�rrrrrs�environ�szProcess.environcCs>|��td}t��}z
||WStk
r8YdSXdS)Nr;)r�r�rZget_terminal_map�KeyError)r�Ztty_nrZtmaprrrrrs�terminal�s
zProcess.terminalcCs|��td|_|jS)Nr3)r�r�r�r�rrrrrsr3�szProcess.ppidcCs.|��}t�|td|td|td�S)Nr5r6r7)r�rZpuidsr��r�Zrawtuplerrrrrs�uids�s


�zProcess.uidscCs.|��}t�|td|td|td�S)Nr8r9r:)r�rZpgidsr�r�rrrrrs�gids�s


�zProcess.gidscCs8|��}t�|td|td|td|td�S)NrArBrCrD)r�rrar�r�rrrrrsrv�s



�zProcess.cpu_timescCs|��tdS)NrJ�r�r�r�rrrrrs�cpu_num�szProcess.cpu_numcCs@|��}t|td|td|td|td|td�S)NrErFrGrHrI)r�r]r�r�rrrrrs�memory_info�s




�zProcess.memory_infocCs|��tdS)Nr<r�r�rrrrrsr<�szProcess.create_timecCs trt�|j�St|���SdSr�)�HAS_PROC_NUM_THREADSrkrr�r��threadsr�rrrrrs�num_threads�szProcess.num_threadscCs$|��}t�|td|td�S)Nr=r>)r�rZpctxswr�r�rrrrrs�num_ctx_switches�s


�zProcess.num_ctx_switchescCsHt�|j�}g}|D]"\}}}t�|||�}|�|�qtrD|��|Sr�)rkZproc_threadsr�rZpthreadrxrr�)r�r�r�Z	thread_id�utimeZstimer�rrrrrsr��szProcess.threads�inetc	Cs|tkr(td|d�dd�tD��f��tr�t|\}}g}t�|j�}|D]R}|\}}}	}
}}}
|
|jkspt�||krL|	|krLt|||	|
||t	�}|�
|�qL|��t|�St|\}}t�
|j||�}g}|D]2}|\}}}	}
}}t|||	|
||t	�}|�
|�q�t�r|��|S)Nr�r�cSsg|]}t|��qSrrr�r�rrrrrsr��sz'Process.connections.<locals>.<listcomp>)r
r�r�rrkr�r�r�rr�rxr�r�Zproc_connectionsr)r�r�r�r�ryr�rzr�r�r�r�r�r4r�r�rrrrrsr��s<���zProcess.connectionsNcCst�|j||j�Sr�)rZwait_pidr�r�)r�Ztimeoutrrrrrs�waitszProcess.waitcCst�|j�Sr�)r��getpriorityr�r�rrrrrs�nice_getszProcess.nice_getcCst�|j|�Sr�)r��setpriorityr�)r��valuerrrrrs�nice_set#szProcess.nice_setcCs|��td}t�|d�S)Nr4�?)r�r��
PROC_STATUSES�get)r��coderrrrrsr4'szProcess.statuscCs(|��}t�|td|tddd�S)Nr?r@r�)r�rZpior�r�rrrrrs�io_counters-s

�zProcess.io_counterscCs>tr|jdkrdStstr*t�|j�p(dSttr4dnd��dS)z)Return process current working directory.rNr{r�)rr�r�HAS_PROC_OPEN_FILESrkZproc_cwdr~rr�rrrrrs�cwd6s��zProcess.cwdZmmaprergcCst�dSr�)r~r�rrrrrs�_not_implementedKszProcess._not_implementedcCst�|j�}dd�|D�S)z8Return files opened by process as a list of namedtuples.cSsg|]\}}t�||��qSrr)rZ	popenfile)r��pathr�rrrrrsr�Usz&Process.open_files.<locals>.<listcomp>)rkrr�)r�r�rrrrrs�
open_filesQszProcess.open_filescCst�|j�}tr|��|S)z=Return the number of file descriptors opened by this process.)rkrr�rr�r�rrrrrs�num_fds\szProcess.num_fdscCst�|j�Sr�)rkZproc_cpu_affinity_getr�r�rrrrrs�cpu_affinity_getjszProcess.cpu_affinity_getc
Cs�tttt����}|D]}||krtd||f��qzt�|j|�WnXtk
r�}z:|j	t	j
t	jfkr�|D]}||krntd||f��qn�W5d}~XYnXdS)Nz#invalid CPU #%i (choose between %s))�tupler�r�rr�rkZproc_cpu_affinity_setr�r�r�r�ZEDEADLK)r�ZcpusZallcpusr�r�rrrrrs�cpu_affinity_setns&���zProcess.cpu_affinity_setcCst�|j�Sr�)rkZproc_memory_mapsr�r�rrrrrs�memory_maps�szProcess.memory_mapscCsP|dkrt�|j|�St|�dkr2tdt|���|\}}t�|j|||�SdS)Nrz4second argument must be a (soft, hard) tuple, got %s)rkZproc_getrlimitr�r�r�r�Zproc_setrlimit)r��resourceZlimitsZsoftZhardrrrrrs�rlimit�s��zProcess.rlimit)r�)N)N)0�__name__�
__module__�__qualname__�__doc__�	__slots__r�r�r�rr�r�r�rKr�r�r�r�r3r�r�rvrr�r�Zmemory_full_infor<r�r�r�r�r�r�rr4rrrZnt_mmap_groupedZnt_mmap_extr	rr�HAS_PROC_NUM_FDSrr
rrrrrrrrrrsr�Is�










	



!




��


r�)F)~r�
contextlibr�r�r�Zxml.etree.ElementTreeZetreeZElementTreer��collectionsrrr�rrrrkrr�r	r
rrr
rrrrrrZ_compatrrrrZ__extra__all__ZSIDLZSTATUS_IDLEZSRUNZSTATUS_RUNNINGZSSLEEPZSTATUS_SLEEPINGZSSTOPZSTATUS_STOPPEDr�Z
STATUS_ZOMBIEZSWAITZSTATUS_WAITINGZSLOCKZ
STATUS_LOCKEDrZSDEADZ
STATUS_WAKINGZSONPROCZTCPS_ESTABLISHEDZCONN_ESTABLISHEDZ
TCPS_SYN_SENTZ
CONN_SYN_SENTZTCPS_SYN_RECEIVEDZ
CONN_SYN_RECVZTCPS_FIN_WAIT_1ZCONN_FIN_WAIT1ZTCPS_FIN_WAIT_2ZCONN_FIN_WAIT2ZTCPS_TIME_WAITZCONN_TIME_WAITZTCPS_CLOSEDZ
CONN_CLOSEZTCPS_CLOSE_WAITZCONN_CLOSE_WAITZ
TCPS_LAST_ACKZ
CONN_LAST_ACKZTCPS_LISTENZCONN_LISTENZTCPS_CLOSINGZCONN_CLOSINGZPSUTIL_CONN_NONEZ	CONN_NONEr�ZgetpagesizeZPAGESIZEZAF_LINKr�ZHAS_PER_CPU_TIMESr�rr�dictr�rLrWr]Zpfullmemrardrfrhrtrurvrr}r|rr�r�Z
disk_usageZdisk_io_countersr�Znet_if_addrsr�r�r�r�r�r�r�r�r�r�r�r��contextmanagerr��objectr�rrrrrrrs�<module>s��	��
�



�#
���
�����	
	
#
(






Filemanager

Name Type Size Permission Actions
__init__.cpython-38.opt-1.pyc File 62.18 KB 0644
__init__.cpython-38.pyc File 62.24 KB 0644
_common.cpython-38.opt-1.pyc File 20.33 KB 0644
_common.cpython-38.pyc File 20.45 KB 0644
_compat.cpython-38.opt-1.pyc File 11.09 KB 0644
_compat.cpython-38.pyc File 11.09 KB 0644
_psaix.cpython-38.opt-1.pyc File 14.92 KB 0644
_psaix.cpython-38.pyc File 14.92 KB 0644
_psbsd.cpython-38.opt-1.pyc File 20.44 KB 0644
_psbsd.cpython-38.pyc File 20.53 KB 0644
_pslinux.cpython-38.opt-1.pyc File 48.48 KB 0644
_pslinux.cpython-38.pyc File 48.57 KB 0644
_psosx.cpython-38.opt-1.pyc File 14.41 KB 0644
_psosx.cpython-38.pyc File 14.49 KB 0644
_psposix.cpython-38.opt-1.pyc File 4.4 KB 0644
_psposix.cpython-38.pyc File 4.43 KB 0644
_pssunos.cpython-38.opt-1.pyc File 17.94 KB 0644
_pssunos.cpython-38.pyc File 17.99 KB 0644
_pswindows.cpython-38.opt-1.pyc File 28.23 KB 0644
_pswindows.cpython-38.pyc File 28.43 KB 0644