Repository navigation
Expand file tree
/
Copy pathAzRA.psm1
More file actions
38 lines (34 loc) · 1.4 KB
/
Copy pathAzRA.psm1
File metadata and controls
38 lines (34 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# AzRA.psm1
# Author: Xtormin (Jennifer Torres)
# Twitter: https://twitter.com/xtormin
# Description: PowerShell module for Azure and Microsoft 365 security reconnaissance and testing.
# Import Private functions (helpers) first
$PrivatePath = Join-Path $PSScriptRoot 'Private'
if (Test-Path $PrivatePath) {
Get-ChildItem -Path "$PrivatePath\*.ps1" -ErrorAction SilentlyContinue | ForEach-Object {
Write-Verbose "Importing private function: $($_.Name)"
. $_.FullName
}
}
# Import Public functions (Internal + External reconnaissance)
$PublicPath = Join-Path $PSScriptRoot 'Public'
if (Test-Path $PublicPath) {
# Import from Public/Internal
$InternalPath = Join-Path $PublicPath 'Internal'
if (Test-Path $InternalPath) {
Get-ChildItem -Path "$InternalPath\*.ps1" -ErrorAction SilentlyContinue | ForEach-Object {
Write-Verbose "Importing internal function: $($_.Name)"
. $_.FullName
}
}
# Import from Public/External
$ExternalPath = Join-Path $PublicPath 'External'
if (Test-Path $ExternalPath) {
Get-ChildItem -Path "$ExternalPath\*.ps1" -ErrorAction SilentlyContinue | ForEach-Object {
Write-Verbose "Importing external function: $($_.Name)"
. $_.FullName
}
}
}
# Export all public functions (Get-AzRA-*, Invoke-*, Request-*)
Export-ModuleMember -Function *-AzRA-*, Invoke-O365EmailValidator