Skip to content

Commit 190d95b

Browse files
committed
updated monkey365 version
1 parent 34313df commit 190d95b

File tree

3 files changed

+67
-36
lines changed

3 files changed

+67
-36
lines changed

Invoke-Monkey365.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ Function Invoke-Monkey365{
591591
}
592592
Write-Information @msg
593593
$MSAL = ("{0}{1}core/modules/monkeymsal" -f $O365Object.Localpath,[System.IO.Path]::DirectorySeparatorChar)
594-
Import-Module $MSAL -Scope Global -Force -ArgumentList $O365Object.forceMSALDesktop
594+
Import-Module $MSAL -Force -ArgumentList $O365Object.forceMSALDesktop -Scope Global
595595
################### End Validate parameters #####################
596596
#Initialize authentication parameters
597597
Initialize-AuthenticationParam

monkey365.psd1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'monkey365.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.95.8'
15+
ModuleVersion = '0.96'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -30,7 +30,7 @@ CompanyName = 'monkey365'
3030
Copyright = '(c)2021 Juan Garrido. All rights reserved.'
3131

3232
# Description of the functionality provided by this module
33-
Description = 'Monkey365 provides a tool for security consultants to easily conduct not only Microsoft 365, but also Azure subscriptions and Azure Active Directory security configuration reviews.'
33+
Description = 'Monkey365 provides a tool that enables security consultants to efficiently perform security configuration reviews across Microsoft 365, Azure subscriptions, and Microsoft Entra ID.'
3434

3535
# Minimum version of the Windows PowerShell engine required by this module
3636
PowerShellVersion = '3.0'
@@ -67,7 +67,7 @@ RequiredModules = @()
6767

6868
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
6969
NestedModules = @(
70-
#'core/modules/monkeyutils/monkeyutils.psm1',
70+
#'core/modules/monkeyutils/monkeyutils.psm1'
7171
#'core/modules/monkeylogger/monkeylogger.psm1'
7272
)
7373

@@ -82,7 +82,8 @@ FunctionsToExport = @(
8282
'Update-PsObject',
8383
'Get-AstFunction',
8484
'Get-ObjectPropertyByPath',
85-
'Register-Monkey365Application'
85+
'Register-Monkey365Application',
86+
'Test-IsPsObject'
8687
)
8788

8889
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.

monkey365.psm1

Lines changed: 61 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,11 @@ $LocalizedDataParams = @{
99
#Import localized data
1010
Import-LocalizedData @LocalizedDataParams;
1111

12-
$msal_modules = @(
13-
'core/modules/monkeycloudutils'
14-
)
15-
$msal_modules.ForEach({Import-Module ("{0}{1}{2}" -f $PSScriptRoot,[System.IO.Path]::DirectorySeparatorChar, $_.ToString()) -Scope Global -Force})
16-
1712
$internal_modules = @(
1813
'core/modules/monkeylogger',
14+
'core/modules/monkeycloudutils',
1915
'core/modules/monkeyutils',
20-
'core/modules/monkeyhttpwebrequest'
16+
'core/modules/monkeyhttpwebrequest',
2117
'core/modules/psmarkdig',
2218
'core/modules/monkeyhtml',
2319
'core/modules/monkeyjob',
@@ -61,37 +57,71 @@ New-Variable -Name m365_plugins -Value $m365_plugins -Scope Script -Force
6157
Get-MonkeyJob | Remove-MonkeyJob
6258

6359
$internal_functions = @(
64-
'/core/init',
65-
'/core/utils',
66-
'/core/collector',
67-
'/core/api/auth',
68-
'/core/html',
69-
'/core/tasks',
70-
'/core/analysis',
71-
'/core/import',
72-
'/core/output',
73-
'/core/watcher',
74-
'/core/api/entraid/msgraph',
75-
'/core/tenant',
76-
'/core/subscription',
77-
'/core/api/azure',
78-
'/core/api/entraid/graph/api',
79-
'/core/api/entraid/graph/helpers/user',
80-
'/core/api/azure/resourcemanagement/api',
81-
'/core/api/azure/resourcemanagement/helpers/tenant',
82-
'/core/api/m365/microsoftteams/',
83-
'/core/api/m365/exchangeonline/'
84-
'/core/api/m365/sharepointonline/',
85-
'/core/api/m365/m365adminportal/'
60+
'core/api/auth',
61+
'core/tenant',
62+
'core/collector',
63+
'core/utils',
64+
'core/subscription',
65+
'core/init',
66+
'core/import',
67+
'core/output',
68+
'core/tasks',
69+
'core/watcher'
8670
)
87-
8871
$all_files = $internal_functions.ForEach({
89-
If([System.IO.Directory]::Exists(("{0}{1}" -f $PSScriptRoot,$_))){
90-
[System.IO.Directory]::EnumerateFiles(("{0}{1}" -f $PSScriptRoot,$_),"*.ps1",[System.IO.SearchOption]::AllDirectories)
72+
If([System.IO.Directory]::Exists(("{0}/{1}" -f $PSScriptRoot,$_))){
73+
[System.IO.Directory]::EnumerateFiles(("{0}/{1}" -f $PSScriptRoot,$_),"*.ps1",[System.IO.SearchOption]::AllDirectories)
9174
}
9275
})
9376
$all_files = $all_files.Where({$_.EndsWith('ps1')})
9477
$all_files.ForEach({. $_})
9578

79+
#Internal files
80+
$internal_files = @(
81+
'core/api/azure/resourcemanagement/api/Get-MonkeyRMObject.ps1',
82+
'core/api/azure/resourcemanagement/helpers/tenant/Get-MonkeyAzTenant.ps1',
83+
'core/api/azure/resourcemanagement/helpers/subscription/Get-MonkeyAzSubscription.ps1',
84+
'core/api/azure/resourcemanagement/helpers/subscription/Get-MonkeyAzClassicAdministrator.ps1',
85+
'core/api/azure/resourcemanagement/helpers/rbac/Get-MonkeyAzIAMPermission.ps1',
86+
'core/api/azure/resourcemanagement/helpers/rbac/Get-MonkeyAzRoleAssignmentForObject.ps1',
87+
'core/api/azure/resourcemanagement/helpers/rbac/Get-MonkeyAzRoleDefinitionObject.ps1',
88+
'core/api/azure/resourcemanagement/helpers/general/Get-MonkeyAzResourceGroup.ps1',
89+
'core/api/azure/resourcemanagement/helpers/general/Get-MonkeyAzResource.ps1',
90+
'core/api/azure/resourcemanagement/helpers/general/Get-MonkeyAzProviderOperation.ps1',
91+
'core/api/entraid/msgraph/api/Get-MonkeyMSGraphObject.ps1',
92+
'core/api/entraid/msgraph/helpers/general/Get-MonkeyMSGraphOrganization.ps1',
93+
'core/api/entraid/msgraph/helpers/general/Get-MonkeyMSGraphSuscribedSku.ps1',
94+
'core/api/entraid/msgraph/helpers/general/Get-MonkeyMSGraphSuscribedSku.ps1',
95+
'core/api/entraid/msgraph/helpers/domain/Get-MonkeyMSGraphDomain.ps1',
96+
'core/api/entraid/msgraph/helpers/general/Test-CanRequestGroup.ps1',
97+
'core/api/entraid/msgraph/helpers/general/Test-CanRequestUser.ps1',
98+
'core/api/entraid/msgraph/helpers/general/Get-MonkeyMSGraphDirectoryObjectById.ps1',
99+
'core/api/entraid/msgraph/helpers/general/Get-MonkeyMSGraphProfilePhoto.ps1',
100+
'core/api/entraid/msgraph/helpers/users/Get-MonkeyMSGraphUser.ps1',
101+
'core/api/entraid/msgraph/helpers/groups/Get-MonkeyMSGraphGroup.ps1',
102+
'core/api/entraid/msgraph/helpers/groups/Get-MonkeyMSGraphGroupTransitiveMember.ps1',
103+
'core/api/entraid/msgraph/helpers/serviceprincipals/Get-MonkeyMSGraphAADServicePrincipal.ps1',
104+
'core/api/entraid/msgraph/helpers/directoryrole/Get-MonkeyMSGraphEntraDirectoryRole.ps1',
105+
'core/api/entraid/msgraph/helpers/directoryrole/Get-MonkeyMSGraphEntraRoleAssignment.ps1',
106+
'core/api/entraid/msgraph/helpers/directoryrole/Get-MonkeyMSGraphObjectDirectoryRole.ps1',
107+
'core/api/m365/exchangeonline/helpers/Get-PSExoModuleFile.ps1',
108+
'core/api/m365/exchangeonline/api/ConvertTo-ExoRestCommand.ps1',
109+
'core/api/m365/exchangeonline/api/Get-PSExoAdminApiObject.ps1',
110+
'core/api/m365/microsoftteams/api/Get-MonkeyTeamsObject.ps1',
111+
'core/api/m365/microsoftteams/helpers/service/Get-MonkeyTeamsServiceDiscovery.ps1',
112+
'core/api/m365/microsoftteams/helpers/service/Test-TeamsConnection.ps1',
113+
'core/api/m365/sharepointonline/csom/api/Invoke-MonkeyCSOMRequest.ps1',
114+
'core/api/m365/sharepointonline/csom/api/Invoke-MonkeyCSOMDefaultRequest.ps1',
115+
'core/api/m365/sharepointonline/csom/helpers/site/Get-MonkeyCSOMSite.ps1',
116+
'core/api/m365/sharepointonline/csom/helpers/site/Get-MonkeyCSOMSiteProperty.ps1',
117+
'core/api/m365/sharepointonline/utils/Test-IsUserSharepointAdministrator.ps1',
118+
'core/api/m365/sharepointonline/utils/Test-SiteConnection.ps1',
119+
'core/scan/Invoke-AzureScanner.ps1',
120+
'core/scan/Invoke-EntraIDScanner.ps1',
121+
'core/scan/Invoke-M365Scanner.ps1'
122+
)
123+
$internal_files = $internal_files.ForEach({[System.IO.FileInfo]::new(("{0}/{1}" -f $PSScriptRoot,$_))})
124+
$internal_files.ForEach({. $_.FullName})
125+
96126
$monkey = ("{0}/Invoke-Monkey365.ps1" -f $PSScriptRoot)
97127
. $monkey

0 commit comments

Comments
 (0)