This repository was archived by the owner on Jan 21, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -875,10 +875,13 @@ a modifiable path.
875875
876876 else {
877877 # if the path doesn't exist, check if the parent folder allows for modification
878- $ParentPath = (Split-Path -Path $TempPath -Parent -ErrorAction SilentlyContinue).Trim()
879- if ($ParentPath -and ($ParentPath -ne '') -and (Test-Path -Path $ParentPath -ErrorAction SilentlyContinue)) {
880- $CandidatePaths += Resolve-Path -Path $ParentPath -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Path
878+ try {
879+ $ParentPath = (Split-Path -Path $TempPath -Parent -ErrorAction SilentlyContinue).Trim()
880+ if ($ParentPath -and ($ParentPath -ne '') -and (Test-Path -Path $ParentPath -ErrorAction SilentlyContinue)) {
881+ $CandidatePaths += Resolve-Path -Path $ParentPath -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Path
882+ }
881883 }
884+ catch {}
882885 }
883886 }
884887 }
@@ -5012,5 +5015,4 @@ $Kernel32 = $Types['kernel32']
50125015$NTDll = $Types['ntdll']
50135016
50145017Set-Alias Get-CurrentUserTokenGroupSid Get-ProcessTokenGroup
5015- Set-Alias Get-UnquotedService Get-UnquotedService
50165018Set-Alias Invoke-AllChecks Invoke-PrivescAudit
You can’t perform that action at this time.
0 commit comments