⚝
One Hat Cyber Team
⚝
Your IP:
3.142.237.38
Server IP:
97.74.87.16
Server:
Linux 16.87.74.97.host.secureserver.net 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
fm-agent
/
library
/
__pycache__
/
View File Name :
process_manager.cpython-39.pyc
a � �fS � @ s$ d dl Z d dlZG dd� de�ZdS )� Nc @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�ProcessManagerc s � �fdd�|D �}|S )zE Return only the pids belonging to certain username. c s2 g | ]*}t j�d | �r� �d | ��kr|�qS )z/proc/%s)�os�path�isdir�get_owner_name)�.0�pid��self�username� �,/usr/lib/fm-agent/library/process_manager.py� <listcomp> s �z8ProcessManager.get_process_from_user.<locals>.<listcomp>r )r �pidsr Z filtered_pidsr r r �get_process_from_user s �z$ProcessManager.get_process_from_userc C s4 zt �t�|�j�d W S tjy. Y dS 0 dS )z: Return the owner name of the passed pid. r N)�pwd�getpwuidr �stat�st_uid�error)r r r r r r s zProcessManager.get_owner_namec C s t ttj|��S )zo Filter non pid process from the list, by checking that they are castable to integers. )�list�filter�str�isdigit)r Zprocess_listr r r �filter_non_pid_process s z%ProcessManager.filter_non_pid_processN)�__name__� __module__�__qualname__r r r r r r r r s r )r r �objectr r r r r �<module> s