mirror of
https://github.com/dafthack/MailSniper
synced 2026-06-08 13:44:44 +00:00
Merge pull request #90 from cnotin/patch-1
Force Get-Content to return arrays
This commit is contained in:
+8
-8
@@ -1029,7 +1029,7 @@ $TASource=@'
|
||||
#Get a list of all mailboxes
|
||||
if($EmailList -ne "")
|
||||
{
|
||||
$AllMailboxes = Get-Content -Path $EmailList
|
||||
$AllMailboxes = @(Get-Content -Path $EmailList)
|
||||
Write-Host "[*] The total number of mailboxes discovered is: " $AllMailboxes.count
|
||||
}
|
||||
else
|
||||
@@ -1851,7 +1851,7 @@ function Get-MailboxFolders{
|
||||
.PARAMETER Remote
|
||||
|
||||
A switch for performing the search remotely across the Internet against a system hosting EWS. Instead of utilizing the current user's credentials if the -Remote option is added a new credential box will pop up for accessing the remote EWS service.
|
||||
|
||||
|
||||
.PARAMETER UsePrt
|
||||
|
||||
Uses current user's PRT to authenticate.
|
||||
@@ -2410,7 +2410,7 @@ function Invoke-PasswordSprayOWA{
|
||||
$OWAURL = ("https://" + $ExchHostname + "/owa/auth.owa")
|
||||
$OWAURL2 = ("https://" + $ExchHostname + "/owa/")
|
||||
|
||||
$Usernames = Get-Content $UserList
|
||||
$Usernames = @(Get-Content $UserList)
|
||||
$count = $Usernames.count
|
||||
$sprayed = @()
|
||||
$userlists = @{}
|
||||
@@ -2614,7 +2614,7 @@ function Invoke-PasswordSprayEWS{
|
||||
$currenttime = Get-Date
|
||||
Write-Host -ForegroundColor "yellow" "[*] Current date and time: $currenttime"
|
||||
#Running the LoadEWSDLL function to load the required Exchange Web Services dll
|
||||
$Usernames = Get-Content $UserList
|
||||
$Usernames = @(Get-Content $UserList)
|
||||
$count = $Usernames.count
|
||||
$sprayed = @()
|
||||
$userlists = @{}
|
||||
@@ -2895,7 +2895,7 @@ function Invoke-DomainHarvestOWA {
|
||||
$Domains = @()
|
||||
|
||||
if ($DomainList -ne "") {
|
||||
$Domains += Get-Content $DomainList
|
||||
$Domains += @(Get-Content $DomainList)
|
||||
}
|
||||
elseif ($CompanyName -ne "") {
|
||||
|
||||
@@ -3103,7 +3103,7 @@ function Invoke-UsernameHarvestOWA {
|
||||
$OWAURL2 = ("https://" + $ExchHostname + "/owa/")
|
||||
|
||||
$Usernames = @()
|
||||
$Usernames += Get-Content $UserList
|
||||
$Usernames += @(Get-Content $UserList)
|
||||
$Users = @()
|
||||
$count = $Usernames.count
|
||||
|
||||
@@ -3541,7 +3541,7 @@ function Invoke-OpenInboxFinder{
|
||||
|
||||
If ($EmailList -ne "")
|
||||
{
|
||||
$Mailboxes = Get-Content -Path $EmailList
|
||||
$Mailboxes = @(Get-Content -Path $EmailList)
|
||||
$Mailbox = $Mailboxes[0]
|
||||
}
|
||||
elseif ($Mailbox -ne "")
|
||||
@@ -3872,7 +3872,7 @@ function Get-ADUsernameFromEWS{
|
||||
|
||||
If ($EmailList -ne "")
|
||||
{
|
||||
$Emails = Get-Content -Path $EmailList
|
||||
$Emails = @(Get-Content -Path $EmailList)
|
||||
$EmailAddress = $Emails[0]
|
||||
}
|
||||
elseif ($Emails -ne "")
|
||||
|
||||
Reference in New Issue
Block a user