aboutsummaryrefslogtreecommitdiff
path: root/Recon
diff options
context:
space:
mode:
authorStephen Breen <breen.machine@gmail.com>2016-06-11 00:26:40 -0400
committerStephen Breen <breen.machine@gmail.com>2016-06-11 00:26:40 -0400
commit8270743fb1ec9dc00da0aab41ea98db594fc02ed (patch)
tree6dbf68bbfe22037585bc01bf950480a056b8bb15 /Recon
parentc53cd87d8f93637a2f26973036a749ab9d3e78fc (diff)
downloadPowerSploit-8270743fb1ec9dc00da0aab41ea98db594fc02ed.tar.gz
PowerSploit-8270743fb1ec9dc00da0aab41ea98db594fc02ed.zip
Fixed thread countdown timer in Invoke-ThreadedFunction, wasn't ever killing rogue jobs
Diffstat (limited to 'Recon')
-rwxr-xr-xRecon/PowerView.ps12
1 files changed, 1 insertions, 1 deletions
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
}