Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Locksmith2.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Description='An AD CS toolkit for AD Admins, Defensive Security Professionals, and Filthy Red Teamers'
FunctionsToExport=@('*')
GUID='e32f7d0d-2b10-4db2-b776-a193958e3d69'
ModuleVersion='2026.5.121255'
ModuleVersion='2026.5.121323'
PowerShellVersion='5.1'
PrivateData=@{
PSData=@{
Expand Down
15 changes: 10 additions & 5 deletions Public/New-LS2Dashboard.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,19 @@ function New-LS2Dashboard {
$generatedAt = Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
$scanUser = if ($script:Credential) { $script:Credential.UserName } else { [System.Security.Principal.WindowsIdentity]::GetCurrent().Name }
$scanComputer = "$env:USERDOMAIN\$env:COMPUTERNAME"
# Resolve logo — try module base first, then walk up for source-tree runs
$logoPath = $null
# Resolve logo and encode as base64 data URI for self-contained HTML
$logoSource = $null
$moduleBase = (Get-Module -Name Locksmith2 -ErrorAction SilentlyContinue).ModuleBase
foreach ($candidate in @(
(Join-Path $moduleBase 'Images\Locksmith2.png'),
(Join-Path $moduleBase '..\..\..\Images\Locksmith2.png')
)) {
if (Test-Path $candidate) { $logoPath = (Resolve-Path $candidate).Path; break }
if (Test-Path $candidate) {
$logoBytes = [System.IO.File]::ReadAllBytes((Resolve-Path $candidate).Path)
$logoBase64 = [System.Convert]::ToBase64String($logoBytes)
$logoSource = "data:image/png;base64,$logoBase64"
break
}
}

# Conditional formatting shared by all issue tables
Expand Down Expand Up @@ -215,8 +220,8 @@ function New-LS2Dashboard {
# container and does not create a tab-content slot (unlike New-HTMLSection/Panel at this level).
New-HTMLHeader {
Add-HTMLStyle -Content 'header { text-align: center; padding: 12px 0; } header img { max-width: 50%; height: auto; display: inline-block; }'
if ($logoPath) {
New-HTMLImage -Source $logoPath -Width '50%' -DisableCache -AlternativeText 'Locksmith 2'
if ($logoSource) {
New-HTMLImage -Source $logoSource -Width '50%' -AlternativeText 'Locksmith 2'
}
New-HTMLText -Text "Forest: $forestName | User: $scanUser | Computer: $scanComputer | Generated: $generatedAt" -FontSize 12 -Color '#555' -Alignment center
}
Expand Down
Loading