[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.147.2.189: ~ $
U

�=�_{H�@s�dZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddl	mZddl	mZ
ddl	mZdd	l
mZdd
l
mZddl
mZddl
mZdd
l
mZddl
mZddl
mZddl
mZddl
mZddl
mZddlmZddlmZddlmZddlmZdgZe e
d�Z!e e
d�Z"e e
d�Z#e�$�Z%ej&Z&e
j'e
j(e
j)e
j*e
j+e
j,e
j-e
j,e
j.e
j/iZ0e
j1e
j2e
j3e
j4e
j5e
j6e
j7e
j8e
j9e
j:e
j;e
j<e
j=e
j>e
j?e
j@e
jAe
jBe
jCe
jDe
jEe
jFe
jGe
jHiZIeJdddddddd d!�ZKed"d#d$g�ZLeLZMed%d&d'd(d)g�ZNed*d+d,d-d.d/g�ZOd0d1�ZPd2d3�ZQd4d5�ZRd6d7�ZSd8d9�ZTd:d;�ZUd<d=�ZVe
jWZWejXZXdRd?d@�ZYejZZZe"�r�e
j[Z[dSdBdC�Z\dDdE�Z]dFdG�Z^dHdI�Z_dJdK�Z`dLdM�ZadNdO�ZbGdPdQ�dQec�ZddS)TzAIX platform implementation.�N)�
namedtuple�)�_common)�_psposix)�_psutil_aix)�
_psutil_posix)�AccessDenied)�conn_to_ntuple)�get_procfs_path)�memoize_when_activated)�NIC_DUPLEX_FULL)�NIC_DUPLEX_HALF)�NIC_DUPLEX_UNKNOWN)�
NoSuchProcess)�
usage_percent)�
ZombieProcess)�FileNotFoundError)�PermissionError)�ProcessLookupError)�PY3ZPROCFS_PATH�proc_threads�net_io_counters�proc_io_counters������)�ppid�rss�vms�create_time�nice�num_threads�status�ttynr�pmemr r!�	scputimes�user�systemZidleZiowait�svmem�totalZ	available�percent�used�freecCs4t��\}}}}}t|||dd�}t|||||�S)Nr�Zround_)�cextZvirtual_memrr+)r,Zavailr/ZpinnedZinuser-�r2�@/opt/alt/python38/lib64/python3.8/site-packages/psutil/_psaix.py�virtual_memoryjsr4cCs:t��\}}}}||}t||dd�}t�||||||�S)z=Swap system memory as a (total, used, free, sin, sout) tuple.rr0)r1Zswap_memrrZsswap)r,r/ZsinZsoutr.r-r2r2r3�swap_memorypsr5cCst��}tdd�t|�D��S)z-Return system-wide CPU times as a named tuplecSsg|]}t|��qSr2)�sum��.0�xr2r2r3�
<listcomp>�szcpu_times.<locals>.<listcomp>)r1�
per_cpu_timesr(�zip��retr2r2r3�	cpu_times}sr?cCst��}dd�|D�S)z5Return system per-CPU times as a list of named tuplescSsg|]}t|��qSr2)r(r7r2r2r3r:�sz!per_cpu_times.<locals>.<listcomp>)r1r;r=r2r2r3r;�sr;cCs(zt�d�WStk
r"YdSXdS)z0Return the number of logical CPUs in the system.�SC_NPROCESSORS_ONLNN)�os�sysconf�
ValueErrorr2r2r2r3�cpu_count_logical�srDcCsrd}tj|dtjtjd�}|��\}}tr@dd�||fD�\}}|jdkrZtd||f��|����}t	|�ppdS)Nzlsdev -Cc processorT)�shell�stdout�stderrcSsg|]}|�tjj��qSr2��decode�sysrF�encodingr7r2r2r3r:�s�z&cpu_count_physical.<locals>.<listcomp>rz%r command error
%s)
�
subprocess�Popen�PIPE�communicater�
returncode�RuntimeError�strip�
splitlines�len)�cmd�prFrGZ
processorsr2r2r3�cpu_count_physical�s��

rWcCs t��\}}}}t�||||�S)z*Return various CPU stats as a named tuple.)r1�	cpu_statsrZ	scpustats)Zctx_switchesZ
interruptsZsoft_interruptsZsyscallsr2r2r3rX�s�rXFc	Cshg}t��}|D]R}|\}}}}|dkr,d}|s<t|�js<qd}}	t�||||||	�}
|�|
�q|S)zReturn system disk partitions.Znone�N)r1�disk_partitions�
disk_usager,rZ	sdiskpart�append)�all�retlistZ
partitions�	partitionZdeviceZ
mountpointZfstypeZoptsZmaxfileZmaxpath�ntupler2r2r3rZ�s 
�rZ���cCs�tj}||kr.td|d�dd�|D��f��tj|\}}t�|�}g}|D]X}|\}}	}
}}}
}|	|krnqN|
|krxqNt||	|
|||
t|dkr�|ndd�}|�|�qN|S)z�Return socket connections.  If pid == -1 return system-wide
    connections (as opposed to connections opened by one process only).
    z+invalid %r kind argument; choose between %sz, cSsg|]}t|��qSr2)�reprr7r2r2r3r:�sz#net_connections.<locals>.<listcomp>raN��pid)	rZ	conn_tmaprC�joinr1�net_connectionsr	�TCP_STATUSESr\)�kind�_pidZcmapZfamilies�types�rawlistr>�item�fdZfamZtype_ZladdrZraddrr%rd�ntr2r2r3rf�s(�
�rfcCs�ttd�}tdd�t�D��}i}|D]�}t�|�\}}d}d}tjdd|gtjtjd�}|�	�\}	}
t
r�d	d�|	|
fD�\}	}
|jdkr�t�
d
|	�}|dk	r�t|�d��}|�d
�}|�|t�}t�||||�||<q&|S)z)Get NIC stats (isup, duplex, speed, mtu).)ZFullZHalfcSsg|]}|d�qS)rr2r7r2r2r3r:�sz net_if_stats.<locals>.<listcomp>rYrz/usr/bin/entstatz-d�rFrGcSsg|]}|�tjj��qSr2rHr7r2r2r3r:�s�z"Running: (\d+) Mbps.*?(\w+) DuplexNrr)rr
�set�net_if_addrsr1�net_if_statsrLrMrNrOrrP�re�search�int�group�getrrZ	snicstats)Z
duplex_map�namesr>�nameZisupZmtuZduplexZspeedrVrFrGZ	re_resultr2r2r3rr�s:���

�
rrcCst��S)z:The system boot time expressed in seconds since the epoch.)r1�	boot_timer2r2r2r3rzsrzcCs\g}t��}d}|D]B}|\}}}}}}	|s.q||kr:d}t�|||||	�}
|�|
�q|S)z:Return currently connected users as a list of namedtuples.)z:0.0z:0�	localhost)r1�usersrZsuserr\)r^rkr{rlr)ZttyZhostnameZtstampZuser_processrdrnr2r2r3r|sr|cCsdd�t�t��D�S)z7Returns a list of PIDs currently running on the system.cSsg|]}|��rt|��qSr2)�isdigitrur7r2r2r3r:-szpids.<locals>.<listcomp>)rA�listdirr
r2r2r2r3�pids+srcCstj�tj�t�t|�d��S)z&Check for the existence of a unix pid.Zpsinfo)rA�path�existsrer
�strrcr2r2r3�
pid_exists0sr�cst����fdd��}|S)z�Call callable into a try/except clause and translate ENOENT,
    EACCES and EPERM in NoSuchProcess or AccessDenied exceptions.
    c	s|z�|f|�|�WSttfk
rVt|j�s@t|j|j��nt|j|j|j��Yn"tk
rvt	|j|j��YnXdS�N)
rrr�rdr�_namer�_ppidrr)�self�args�kwargs��funr2r3�wrapper9s
z wrap_exceptions.<locals>.wrapper)�	functools�wraps)r�r�r2r�r3�wrap_exceptions5s
r�c@sxeZdZdZdddddgZdd�Zd	d
�Zdd�Zee	d
d���Z
ee	dd���Zedd��Zedd��Z
edd��Zedd��Zedd��Zedd��Zer�edd��ZedAd d!��Zed"d#��Zed$d%��Zed&d'��Zed(d)��Zed*d+��Zed,d-��Zed.d/��Zed0d1��Zed2d3��ZeZed4d5��Zd6d7�Z ed8d9��Z!ed:d;��Z"edBd=d>��Z#e$�rted?d@��Z%d<S)C�Processz1Wrapper class around underlying C implementation.rdr�r��_procfs_path�_cachecCs||_d|_d|_t�|_dSr�)rdr�r�r
r�)r�rdr2r2r3�__init__OszProcess.__init__cCs|j�|�|j�|�dSr�)�_proc_basic_infoZcache_activate�
_proc_cred�r�r2r2r3�
oneshot_enterUszProcess.oneshot_entercCs|j�|�|j�|�dSr�)r�Zcache_deactivater�r�r2r2r3�oneshot_exitYszProcess.oneshot_exitcCst�|j|j�Sr�)r1Zproc_basic_infordr�r�r2r2r3r�]szProcess._proc_basic_infocCst�|j|j�Sr�)r1Z	proc_credrdr�r�r2r2r3r�bszProcess._proc_credcCs$|jdkrdSt�|j|j��d�S)NrZswapper�)rdr1Z	proc_namer��rstripr�r2r2r3rygs
zProcess.namecCs�|��}|sdS|d}tjj|kr�tj�|�sJtj�tj�|��|��}tj�|�rttj�|�rtt�	|tj
�rt|Stj�|�}tjd�
d�D]<}tj�tj�||��}tj�|�r�t�	|tj
�r�|Sq�dS)NrYr�PATH�:)�cmdlinerAr��sep�isabs�abspathre�cwd�isfile�access�X_OK�basename�environ�split)r�r��exer�Zpossible_exer2r2r3r�ns*
���
zProcess.execCst�|j�Sr�)r1Z	proc_argsrdr�r2r2r3r��szProcess.cmdlinecCst�|j�Sr�)r1Zproc_environrdr�r2r2r3r��szProcess.environcCs|��tdS)Nr"�r��
proc_info_mapr�r2r2r3r"�szProcess.create_timecCs|��tdS)Nr$r�r�r2r2r3r$�szProcess.num_threadscCsVt�|j�}g}|D]"\}}}t�|||�}|�|�q|sRt�d|j|jf�|S)N�%s/%s)	r1rrdrZpthreadr\rA�statr�)r�rkr^Z	thread_id�utimeZstimer`r2r2r3�threads�szProcess.threads�inetcCs,t||jd�}|s(t�d|j|jf�|S)N)rir�)rfrdrAr�r�)r�rhr>r2r2r3�connections�szProcess.connectionscCst�|j�Sr�)�
cext_posix�getpriorityrdr�r2r2r3�nice_get�szProcess.nice_getcCst�|j|�Sr�)r��setpriorityrd)r��valuer2r2r3�nice_set�szProcess.nice_setcCs|��td|_|jS)Nr)r�r�r�r�r2r2r3r�szProcess.ppidcCs"|��\}}}}}}t�|||�Sr��r�rZpuids)r��real�	effective�saved�_r2r2r3�uids�szProcess.uidscCs"|��\}}}}}}t�|||�Sr�r�)r�r�r�r�r�r2r2r3�gids�szProcess.gidscCst�|j|j�}tj|�Sr�)r1Zproc_cpu_timesrdr�rZ	pcputimes)r�r?r2r2r3r?�szProcess.cpu_timescCsP|��td}|d@d?|d@B}t�d�D]}t�|�j|kr.|Sq.dS)Nr&l��i��z	/dev/**/*)r�r��globrAr��st_rdev)r�ZttydevZdevr2r2r3�terminal�s
zProcess.terminalcCsV|j}z t�d||jf�}|�d�WStk
rPt�d||jf�YdSXdS)Nz	%s/%s/cwd�/r�)r�rA�readlinkrdr�rr�)r�Zprocfs_path�resultr2r2r3r��szProcess.cwdcCs2|��}|tdd}|tdd}t||�S)Nr ir!)r�r�r')r�r>r r!r2r2r3�memory_info�szProcess.memory_infocCs|��td}t�|d�S)Nr%�?)r�r��
PROC_STATUSESrw)r��coder2r2r3r%�szProcess.statuscCs�tjddt|j�gtjtjd�}|��\}}trFdd�||fD�\}}d|��kr`t|j|j	��t
�d|�}g}|D]J\}}|��}|�
d�r�|d	d�}|��d
kr�qt|�t�|t|���qt|S)Nz/usr/bin/procfilesz-nrocSsg|]}|�tjj��qSr2rHr7r2r2r3r:�s�z&Process.open_files.<locals>.<listcomp>zno such processz (\d+): S_IFREG.*\s*.*name:(.*)\nz//rzcannot be retrieved)rLrMr�rdrNrOr�lowerrr�rs�findallrR�
startswithr\rZ	popenfileru)r�rVrFrGZ	procfilesr^rmr�r2r2r3�
open_files�s*��

zProcess.open_filescCs(|jdkrdStt�d|j|jf��S)Nrz%s/%s/fd)rdrTrAr~r�r�r2r2r3�num_fdss
zProcess.num_fdscCstjt�|j��Sr�)rZpctxswr1Zproc_num_ctx_switchesrdr�r2r2r3�num_ctx_switchess
�zProcess.num_ctx_switchesNcCst�|j||j�Sr�)rZwait_pidrdr�)r�Ztimeoutr2r2r3�waitszProcess.waitcCsXzt�|j�\}}}}Wn.tk
rFt|j�s@t|j|j���YnXt�||||�Sr�)	r1rrd�OSErrorr�rr�rZpio)r�ZrcZwc�rb�wbr2r2r3�io_counterss
zProcess.io_counters)r�)N)&�__name__�
__module__�__qualname__�__doc__�	__slots__r�r�r�r�rr�r�ryr�r�r�r"r$�HAS_THREADSr�r�r�r�rr�r�r?r�r�r�Zmemory_full_infor%r�r�r�r��HAS_PROC_IO_COUNTERSr�r2r2r2r3r�Jsv















	



r�)F)ra)er�r�r�rArsrLrJ�collectionsrrYrrrr1rr�rr	r
rrr
rrrrZ_compatrrrrZ__extra__all__�hasattrr�ZHAS_NET_IO_COUNTERSr�ZgetpagesizeZ	PAGE_SIZEZAF_LINKZSIDLZSTATUS_IDLEZSZOMBZ
STATUS_ZOMBIEZSACTIVEZSTATUS_RUNNINGZSSWAPZSSTOPZSTATUS_STOPPEDr�ZTCPS_ESTABLISHEDZCONN_ESTABLISHEDZ
TCPS_SYN_SENTZ
CONN_SYN_SENTZ
TCPS_SYN_RCVDZ
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_NONErg�dictr�r'Zpfullmemr(r+r4r5r?r;rDrWrXZdisk_io_countersr[rZrqrrfrrrzr|rr�r��objectr�r2r2r2r3�<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