preserve #1071
parent
da4ff2f9b7
commit
9b16997aba
|
@ -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)."
|
||||||
|
|
Loading…
Reference in New Issue