[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.15.188.84: ~ $
U

�=�_�c�@sLdZddlZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddl
mZddl
m
Zdd	l
mZdd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm!Z!dddgZ"e�#�Z$ej%Z%ej&dkZ'dZ(dZ)ej*ej+ej,ej-ej.ej/ej0ej1ej2ej3ej4ej-ej5ej6iZ7ej8ej9ej:ej;ej<ej=ej>ej?ej@ejAejBejCejDejEejFejGejHejIejJejKejLejMejNejOejPe(ejQe)iZReSddd d!d"d#d$d%d&d'd(d)d*�ZTed+d,d-d.d/g�ZUed0d,d-d1d2g�ZVed3d4d5d6d7d8g�ZWed9d:d;g�ZXeXZYed<d=d:d>d?g�ZZed@dAdB�[eZj\��Z]dCdD�Z^dEdF�Z_dGdH�Z`dIdJ�ZadKdL�ZbdMdN�ZcdOdP�ZdejeZeejfZfdedRdS�ZgejhZhejiZidfdUdV�ZjdWdX�ZkdYdZ�Zld[d\�Zmd]d^�Znd_d`�Zodadb�ZpGdcdd�ddeq�ZrdS)gz'Sun OS Solaris platform implementation.�N)�
namedtuple)�AF_INET�)�_common)�_psposix)�
_psutil_posix)�
_psutil_sunos)�AccessDenied)�AF_INET6)�debug)�get_procfs_path)�
isfile_strict)�memoize_when_activated)�
NoSuchProcess)�sockfam_to_enum)�socktype_to_enum)�
usage_percent)�
ZombieProcess)�b)�FileNotFoundError)�PermissionError)�ProcessLookupError)�PY3�	CONN_IDLE�
CONN_BOUNDZPROCFS_PATHlZIDLEZBOUND��������	�
�)�ppid�rss�vms�create_time�nice�num_threads�status�ttynr�uid�euid�gid�egid�	scputimes�user�systemZidleZiowait�	pcputimes�
children_user�children_system�svmem�totalZ	available�percent�used�free�pmemr&r'�
pmmap_grouped�pathZ	anonymous�locked�	pmmap_extzaddr perms � cCsFt�d�t}t�d�t}}||}t||dd�}t|||||�S)zReport virtual memory metrics.�
SC_PHYS_PAGES�SC_AVPHYS_PAGESr�Zround_)�os�sysconf�	PAGE_SIZErr7)r8r;Zavailr:r9�rH�B/opt/alt/python38/lib64/python3.8/site-packages/psutil/_pssunos.py�virtual_memory{s
rJc
	Cs
t��\}}tjddtjdddgtjd�}|��\}}trL|�	t
jj�}|j
dkrdtd|j
��|���d	�d
d�}|s�td��d}}|D]D}|��}|d
d�\}	}
|tt|	�d�7}|tt|
�d�7}q�||}t||d
d�}t�|||||t|t�S)zReport swap memory metrics.z/usr/bin/envzPATH=/usr/sbin:/sbin:%s�PATHZswapz-l)�stdoutrz'swap -l' failed (retcode=%s)�
rNzno swap device(s) configuredrrirD)�cextZswap_mem�
subprocess�PopenrE�environ�PIPE�communicater�decode�sysrL�encoding�
returncode�RuntimeError�strip�split�intrrZsswaprG)
ZsinZsout�prL�stderr�linesr8r;�line�t�fr:r9rHrHrI�swap_memory�s:���
�rbcCst��}tdd�t|�D��S)z-Return system-wide CPU times as a named tuplecSsg|]}t|��qSrH)�sum��.0�xrHrHrI�
<listcomp>�szcpu_times.<locals>.<listcomp>)rN�
per_cpu_timesr1�zip��retrHrHrI�	cpu_times�srlcCst��}dd�|D�S)z5Return system per-CPU times as a list of named tuplescSsg|]}t|��qSrH)r1rdrHrHrIrg�sz!per_cpu_times.<locals>.<listcomp>)rNrhrjrHrHrIrh�srhcCs(zt�d�WStk
r"YdSXdS)z0Return the number of logical CPUs in the system.�SC_NPROCESSORS_ONLNN)rErF�
ValueErrorrHrHrHrI�cpu_count_logical�srocCst��S)z1Return the number of physical CPUs in the system.)rNZcpu_count_physrHrHrHrI�cpu_count_physical�srpcCs$t��\}}}}d}t�||||�S)z*Return various CPU stats as a named tuple.r)rN�	cpu_statsrZ	scpustats)Zctx_switchesZ
interruptsZsyscallsZtrapsZsoft_interruptsrHrHrIrq�s

�rqFcCs�g}t��}|D]�}|\}}}}|dkr,d}|s~zt|�js@WqWn:tk
r|}ztd||f�WY�qW5d}~XYnXd}	}
t�|||||	|
�}|�|�q|S)zReturn system disk partitions.Znone�zskipping %r: %rN)	rN�disk_partitions�
disk_usager8�OSErrorrrZ	sdiskpart�append)�all�retlistZ
partitions�	partitionZdeviceZ
mountpointZfstypeZopts�errZmaxfileZmaxpathZntuplerHrHrIrs�s(
�rs���c
Cstj��}|dkr|�dd�||krFtd|d�dd�|D��f��tj|\}}t�|�}t�}|D]�}|\}}	}
}}}
}|	|kr�qh|
|kr�qh|	t	t
fkr�|r�tj|�}|r�tj|�}t|
}
t
|	�}	t|
�}
|dkr�t�||	|
|||
|�}nt�||	|
|||
�}|�|�qht|�S)z�Return socket connections.  If pid == -1 return system-wide
    connections (as opposed to connections opened by one process only).
    Only INET sockets are returned (UNIX are not).
    r{�unixrz+invalid %r kind argument; choose between %sz, cSsg|]}t|��qSrH)�reprrdrHrHrIrgsz#net_connections.<locals>.<listcomp>)rZ	conn_tmap�copy�poprn�joinrN�net_connections�setrr
�addr�TCP_STATUSESrrZsconn�pconn�add�list)�kind�_pidZcmapZfamilies�types�rawlistrk�item�fdZfamZtype_ZladdrZraddrr+�pid�ntrHrHrIr��s:
�


r�cCsRt��}|��D]<\}}|\}}}}ttd�r8t�|�}t�||||�||<q|S)z)Get NIC stats (isup, duplex, speed, mtu).�	NicDuplex)rN�net_if_stats�items�hasattrrr�Z	snicstats)rk�namer�ZisupZduplexZspeedZmturHrHrIr�!s

r�cCst��S)z:The system boot time expressed in seconds since the epoch.)rN�	boot_timerHrHrHrIr�1sr�cCs\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)rN�usersrZsuserrv)rxr�r�r�r2�ttyZhostnameZtstampZuser_processr�r�rHrHrIr�6sr�cCsdd�t�tt���D�S)z7Returns a list of PIDs currently running on the system.cSsg|]}|��rt|��qSrH)�isdigitr[rdrHrHrIrgPszpids.<locals>.<listcomp>)rE�listdirrrrHrHrHrI�pidsNsr�cCs
t�|�S)z&Check for the existence of a unix pid.)r�
pid_exists)r�rHrHrIr�Ssr�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��Yn<t
k
r�|jdkr�dt�kr�t	|j|j��n��YnXdS�Nr)rrr�r�r�_namer�_ppidrr	rur�)�self�args�kwargs��funrHrI�wrapper\s


z wrap_exceptions.<locals>.wrapper)�	functools�wraps)r�r�rHr�rI�wrap_exceptionsXsr�c@s�eZdZdZdddddgZdd�Zd	d
�Zdd�Zd
d�Ze	e
dd���Ze	e
dd���Ze	e
dd���Z
e	dd��Ze	dd��Ze	dd��Ze	dd��Ze	dd��Ze	dd ��Ze	d!d"��Ze	d#d$��Ze	d%d&��Ze	d'd(��Ze	d)d*��Ze	d+d,��Ze	d-d.��Ze	d/d0��Ze	d1d2��Ze	d3d4��ZeZe	d5d6��Ze	d7d8��Z e	d9d:��Z!d;d<�Z"e	dLd>d?��Z#e$d@dA�Z%e$d@dB�Z&e	dCdD��Z'e	dEdF��Z(e	dGdH��Z)e	dMdJdK��Z*dIS)N�Processz1Wrapper class around underlying C implementation.r�r�r��_procfs_path�_cachecCs||_d|_d|_t�|_dS�N)r�r�r�rr�)r�r�rHrHrI�__init__yszProcess.__init__cCst�d|j|jf�dS)z+Raise NSP if the process disappeared on us.�%s/%sN)rE�statr�r��r�rHrHrI�
_assert_aliveszProcess._assert_alivecCs(|j�|�|j�|�|j�|�dSr�)�_proc_name_and_argsZcache_activate�_proc_basic_info�
_proc_credr�rHrHrI�
oneshot_enter�szProcess.oneshot_entercCs(|j�|�|j�|�|j�|�dSr�)r�Zcache_deactivater�r�r�rHrHrI�oneshot_exit�szProcess.oneshot_exitcCst�|j|j�Sr�)rNZproc_name_and_argsr�r�r�rHrHrIr��szProcess._proc_name_and_argscCsT|jdkr,tj�d|j|jf�s,t|j��t�|j|j�}t|�tt	�ksPt
�|S)Nrz%s/%s/psinfo)r�rEr>�existsr�r	rNZproc_basic_info�len�
proc_info_map�AssertionError)r�rkrHrHrIr��s
�
zProcess._proc_basic_infocCst�|j|j�Sr�)rNZ	proc_credr�r�r�rHrHrIr��szProcess._proc_credcCs|��dSr�)r�r�rHrHrIr��szProcess.namecCs:zt�d|j|jf�WStk
r,YnX|��dS)Nz%s/%s/path/a.outrr)rE�readlinkr�r�ru�cmdliner�rHrHrI�exe�s�zProcess.execCs|��d�d�S)NrrA)r�rZr�rHrHrIr��szProcess.cmdlinecCst�|j|j�Sr�)rNZproc_environr�r�r�rHrHrIrQ�szProcess.environcCs|��tdS)Nr(�r�r�r�rHrHrIr(�szProcess.create_timecCs|��tdS)Nr*r�r�rHrHrIr*�szProcess.num_threadscCs|��tdS)Nr)r�r�rHrHrI�nice_get�szProcess.nice_getcCs&|jdkrt|j|j��t�|j|�S)N)rr)r�r	r��
cext_posix�setpriority)r��valuerHrHrI�nice_set�s
zProcess.nice_setcCs|��td|_|jS)Nr%)r�r�r�r�rHrHrIr%�szProcess.ppidcCs`z|��\}}}}}}Wn8tk
rP|��td}|��td}d}YnXt�|||�S)Nr-r.�r�r	r�r�rZpuids)r��real�	effective�saved�_rHrHrI�uids�s
zProcess.uidscCs`z|��\}}}}}}Wn8tk
rP|��td}|��td}d}YnXt�|||�S)Nr/r0r�)r�r�r�r�r�rHrHrI�gids�s
zProcess.gidsc
CsZzt�|j|j�}Wn:tk
rN}z|jtjkr<ts<d}n�W5d}~XYnXtj	|�S)N)�r�r�r�)
rNZproc_cpu_timesr�r�ru�errno�	EOVERFLOW�	IS_64_BITrr4)r��timesrzrHrHrIrl�szProcess.cpu_timescCst�|j|j�Sr�)rNZproc_cpu_numr�r�r�rHrHrI�cpu_numszProcess.cpu_numc	Cs||j}d}t|��td�}|tjkrldD]>}zt�d||j|f�WSt	k
rhd}Yq,Yq,Xq,|rx|�
�dS)NFr,)rrr�z
%s/%d/path/%dT)r�r�r�r�rNZPRNODEVrEr�r�rr�)r��procfs_path�
hit_enoentr�rfrHrHrI�terminals �
�
zProcess.terminalcCsL|j}zt�d||jf�WStk
rFt�d||jf�YdSXdS)Nz%s/%s/path/cwdr�)r�rEr�r�rr�)r�r�rHrHrI�cwdszProcess.cwdcCs2|��}|tdd}|tdd}t||�S)Nr&ir')r�r�r<)r�rkr&r'rHrHrI�memory_info#szProcess.memory_infocCs|��td}t�|d�S)Nr+�?)r�r��
PROC_STATUSES�get)r��coderHrHrIr+,szProcess.statusc
Cs�|j}g}t�d||jf�}d}|D]�}t|�}zt�|j||�\}}WnTtk
r�}z6|jtj	krtt
stWY� q&|jtjkr�d}WY�q&�W5d}~XYq&Xt�
|||�}	|�|	�q&|r�|��|S)Nz	%s/%d/lwpFT)r�rEr�r�r[rNZquery_process_thread�EnvironmentErrorr�r�r��ENOENTrZpthreadrvr�)
r�r�rkZtidsr��tid�utimeZstimerzr�rHrHrI�threads2s0�zProcess.threadsc	Cs�g}d}|j}d||jf}t�d||jf�D]h}tj�||�}tj�|�r0zt�|�}Wntk
rxd}Yq0Yq0Xt	|�r0|�
t�|t
|���q0|r�|��|S)NFz
%s/%d/pathz%s/%d/fdT)r�r�rEr�r>r��islinkr�rr
rvrZ	popenfiler[r�)r�rxr�r�Zpathdirr�r>�filerHrHrI�
open_filesSs"
zProcess.open_filesccs(d|}tj|dtjtjd�}|��\}}trDdd�||fD�\}}|jdkr�d|��krht|j|j	��d|��kr�t
|j|j	��td	||f��|�d
�dd�}t
|�D]v\}}|��}|�d
�r�|�dd�d}	||d��}
|
dkr�tj}
n|
dk�rtj}
nd}
dtj|
|	dtjfVq�dS)z<Get UNIX sockets used by process by parsing 'pfiles' output.z	pfiles %sT)�shellrLr]cSsg|]}|�tjj��qSrH)rTrUrLrVrdrHrHrIrgqs�z-Process._get_unix_sockets.<locals>.<listcomp>rzpermission deniedzno such processz%r command error
%srMrNzsockname: AF_UNIXrA�SOCK_STREAM�
SOCK_DGRAMr{rr)rOrPrRrSrrW�lowerr	r�r�rrXrZ�	enumerate�lstrip�
startswithrY�socketr�r�ZAF_UNIXr�	CONN_NONE)r�r��cmdr\rLr]r^�ir_r>�typerHrHrI�_get_unix_socketshs6��



zProcess._get_unix_sockets�inetcCsPt||jd�}|s(t�d|j|jf�|dkrL|�dd�|�|j�D��|S)N)r�r�)rwr|cSsg|]}tj|��qSrH)rr�)reZconnrHrHrIrg�sz'Process.connections.<locals>.<listcomp>)r�r�rEr�r��extendr�)r�r�rkrHrHrI�connections�s

�zProcess.connectionsZmmapzpath rss anon lockedzaddr perms path rss anon lockedcCs$dd�}|j}g}zt�|j|�}Wn@tk
rd}z"|jtjkrRtsRgWY�S�W5d}~XYnXd}|D]�}|\}}	}
}}}
}|||	�}|�d�s�zt	�
d||j|f�}WnFtk
r�}z(|jtjkr�d||j|f}d}n�W5d}~XYnX|�||
|||
|f�qn|�r |�
�|S)NcSs0dt|�dd��d�t|�dd��d�fS)Nz%s-%sr�L)�hexrY)�start�endrHrHrI�toaddr�s�z#Process.memory_maps.<locals>.toaddrF�[z
%s/%s/path/%sT)r�rNZproc_memory_mapsr�rur�r�r�r�rEr�r�rvr�)r�r�r�rxr�rzr�r�r�ZaddrsizeZpermr�r&Zanonr?rHrHrI�memory_maps�s6

�zProcess.memory_mapscCstt�d|j|jf��S)Nz%s/%s/fd)r�rEr�r�r�r�rHrHrI�num_fds�szProcess.num_fdscCstjt�|j|j��Sr�)rZpctxswrNZproc_num_ctx_switchesr�r�r�rHrHrI�num_ctx_switches�s�zProcess.num_ctx_switchesNcCst�|j||j�Sr�)rZwait_pidr�r�)r�ZtimeoutrHrHrI�wait�szProcess.wait)r�)N)+�__name__�
__module__�__qualname__�__doc__�	__slots__r�r�r�r�r�rr�r�r�r�r�r�rQr(r*r�r�r%r�r�rlr�r�r�r�Zmemory_full_infor+r�r�r�r�rZnt_mmap_groupedZnt_mmap_extr�r�r�r�rHrHrHrIr�ts�







	

	
	






 
 


.

r�)F)r{)srr�r�rEr�rOrU�collectionsrrrrrrrr�rrNr	r
rrr
rrrrrrZ_compatrrrrrZ__extra__all__ZgetpagesizerGZAF_LINK�maxsizer�rrZSSLEEPZSTATUS_SLEEPINGZSRUNZSTATUS_RUNNINGZSZOMBZ
STATUS_ZOMBIEZSSTOPZSTATUS_STOPPEDZSIDLZSTATUS_IDLEZSONPROCZSWAITZSTATUS_WAITINGr�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_NONEr�Z	TCPS_IDLEZ
TCPS_BOUNDr��dictr�r1r4r7r<Zpfullmemr=r��_fieldsr@rJrbrlrhrorprqZdisk_io_countersrtrsZnet_io_countersZnet_if_addrsr�r�r�r�r�r�r��objectr�rHrHrHrI�<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