Skip to content

Commit

Permalink
Stop making a file called 1
Browse files Browse the repository at this point in the history
  • Loading branch information
egypt committed Jan 14, 2019
1 parent 94cb725 commit 1ef3e2d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions DomainPasswordSpray.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function Invoke-DomainPasswordSpray{
Forces the spray to continue and doesn't prompt for confirmation.
.PARAMETER UsernameAsPassword
For each user, will try that user's name as their password
.EXAMPLE
Expand All @@ -65,7 +65,7 @@ function Invoke-DomainPasswordSpray{
.EXAMPLE
C:\PS> Invoke-DomainPasswordSpray -UsernameAsPassword -OutFile valid-creds.txt
Description
-----------
This command will automatically generate a list of users from the current user's domain and attempt to authenticate as each user by using their username as their password. Any valid credentials will be saved to valid-creds.txt
Expand Down Expand Up @@ -101,13 +101,13 @@ function Invoke-DomainPasswordSpray{
$Force,

[Parameter(Position = 7, Mandatory = $false)]
[switch]
[switch]
$UsernameAsPassword,

[Parameter(Position = 8, Mandatory = $false)]
[int]
$Delay=0,

[Parameter(Position = 9, Mandatory = $false)]
$Jitter=0

Expand Down Expand Up @@ -176,7 +176,7 @@ function Invoke-DomainPasswordSpray{
}


if ($Passwords.count > 1)
if ($Passwords.count -gt 1)
{
Write-Host -ForegroundColor Yellow "[*] WARNING - Be very careful not to lock out accounts with the password list option!"
}
Expand Down Expand Up @@ -226,7 +226,7 @@ function Invoke-DomainPasswordSpray{
}
}
}

Write-Host -ForegroundColor Yellow "[*] Password spraying is complete"
if ($OutFile -ne "")
{
Expand Down

0 comments on commit 1ef3e2d

Please # to comment.