mirror of
https://github.com/NexusOne23/noid-privacy.git
synced 2026-02-07 12:11:53 +01:00
CHANGELOG:
- Fixed: Restore Mode manual module selection crash (Critical)
- Root cause: .Split(',', ';', ' ') triggered wrong .NET overload
- Fix: Replaced with native PowerShell -split '[,; ]' operator
- Reported by: KatCat2
VERSION BUMP: 2.2.2 -> 2.2.3
- Updated 48 files with new version number
- CHANGELOG.md: Added v2.2.3 release notes
- README.md: Updated badge, module table, project status
52 lines
1.5 KiB
PowerShell
52 lines
1.5 KiB
PowerShell
<#
|
|
.SYNOPSIS
|
|
Attack Surface Reduction (ASR) Module
|
|
|
|
.DESCRIPTION
|
|
Enables all 19 Microsoft Defender ASR rules in Block mode for comprehensive protection.
|
|
|
|
Hybrid implementation:
|
|
- Registry for backup/verification
|
|
- Set-MpPreference for clean application
|
|
|
|
.NOTES
|
|
Author: NexusOne23
|
|
Version: 2.2.3
|
|
Requires: PowerShell 5.1+, Administrator privileges, Windows Defender
|
|
#>
|
|
|
|
# Get the module root path
|
|
$ModuleRoot = $PSScriptRoot
|
|
|
|
# Dot source all Private functions
|
|
$PrivatePath = Join-Path $ModuleRoot "Private"
|
|
if (Test-Path $PrivatePath) {
|
|
Get-ChildItem -Path $PrivatePath -Filter "*.ps1" | ForEach-Object {
|
|
try {
|
|
. $_.FullName
|
|
}
|
|
catch {
|
|
Write-Host "WARNING: Failed to import private function $($_.Name): $_" -ForegroundColor Yellow
|
|
}
|
|
}
|
|
}
|
|
|
|
# Dot source all Public functions
|
|
$PublicPath = Join-Path $ModuleRoot "Public"
|
|
if (Test-Path $PublicPath) {
|
|
Get-ChildItem -Path $PublicPath -Filter "*.ps1" | ForEach-Object {
|
|
try {
|
|
. $_.FullName
|
|
}
|
|
catch {
|
|
Write-Host "WARNING: Failed to import public function $($_.Name): $_" -ForegroundColor Yellow
|
|
}
|
|
}
|
|
}
|
|
|
|
# Export public functions + Test-ASRCompliance (needed for Invoke-ASRRules verification)
|
|
Export-ModuleMember -Function @('Invoke-ASRRules', 'Test-ASRCompliance')
|
|
|
|
# Alias for naming consistency (non-breaking change)
|
|
New-Alias -Name 'Invoke-ASR' -Value 'Invoke-ASRRules' -Force
|
|
Export-ModuleMember -Alias 'Invoke-ASR'
|