Skip to content
This repository was archived by the owner on Jan 21, 2021. It is now read-only.

Commit d5c0abc

Browse files
Fix for profile cleanup
When removing the persistence, the profile is not cleaned up. This is a temporary fix for that which should leave any legitemate profile content in tact. This psm may need a rework though. Related to: #165
1 parent 7a3e16a commit d5c0abc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Persistence/Persistence.psm1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,8 +740,10 @@ else
740740
$PersistenceRemoval = @"
741741
# Execute the following to remove the elevated persistent payload
742742
$ElevatedTriggerRemoval
743+
(gc `$PROFILE.AllUsersAllHosts) -replace '[\s]{600}.+',''| Out-File `$PROFILE.AllUsersAllHosts -Fo
743744
# Execute the following to remove the user-level persistent payload
744745
$UserTriggerRemoval
746+
(gc `$PROFILE.CurrentUserAllHosts) -replace '[\s]{600}.+',''| Out-File `$PROFILE.CurrentUserAllHosts -Fo
745747
"@
746748

747749

0 commit comments

Comments
 (0)