Skip to content

Commit

Permalink
Update Invoke-BruteForce.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
sammbertram committed Nov 25, 2015
1 parent 5a115b2 commit daa5ae6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Scan/Invoke-BruteForce.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,10 @@ Goude 2012, TreuSec
{
foreach ($password in $passwords)
{
$SleepSeconds = $RandNo.Next((1-$Jitter)*$Delay, (1+$Jitter)*$Delay)
Try
{
Write-Verbose "Checking $username : $password"
Write-Verbose "Checking $username : $password (then sleeping for $SleepSeconds seconds)"
$success = $principalContext.ValidateCredentials($username, $password)
$message = "Password Match"
if ($success -eq $true)
Expand All @@ -247,7 +248,7 @@ Goude 2012, TreuSec
}

# Shamelessly stolen from https://github.com/PowerShellEmpire/PowerTools/tree/master/PowerView
Start-Sleep -Seconds $RandNo.Next((1-$Jitter)*$Delay, (1+$Jitter)*$Delay)
Start-Sleep -Seconds $SleepSeconds
}
}
}
Expand Down

0 comments on commit daa5ae6

Please sign in to comment.