From 8270743fb1ec9dc00da0aab41ea98db594fc02ed Mon Sep 17 00:00:00 2001 From: Stephen Breen Date: Sat, 11 Jun 2016 00:26:40 -0400 Subject: Fixed thread countdown timer in Invoke-ThreadedFunction, wasn't ever killing rogue jobs --- Recon/PowerView.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Recon') diff --git a/Recon/PowerView.ps1 b/Recon/PowerView.ps1 index 1c2bd26..62ed867 100755 --- a/Recon/PowerView.ps1 +++ b/Recon/PowerView.ps1 @@ -9263,7 +9263,7 @@ function Invoke-ThreadedFunction { $WaitTimeout = Get-Date # set a 60 second timeout for the scanning threads - while ($($Jobs | Where-Object {$_.IsCompleted -eq $False}).count -gt 0 -or $($($(Get-Date) - $WaitTimeout).totalSeconds) -gt 60) { + while ($($Jobs | Where-Object {$_.IsCompleted -eq $False}).count -gt 0 -and $($($(Get-Date) - $WaitTimeout).totalSeconds) -lt 60) { Start-Sleep -MilliSeconds 500 } -- cgit v1.2.3