Skip to content

Commit e8a32fb

Browse files
authored
OnlyDomainList fix
OnlyDomainList fix removed wildcards / dups
1 parent cddbdd4 commit e8a32fb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Get-SSLCertInfo-Scan.psm1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<#
22
File: Get-SSLCertInfo-Scan.psm1
33
Author: Scott Sutherland (@_nullbind), NetSPI - 2019
4-
Version: 1.9
4+
Version: 1.10
55
Description: The functions in this module can be used to collect information from remote SSL certificates.
66
License: BSD 3-Clause
77
#>
@@ -246,7 +246,10 @@ function Get-SSLCertInfo-Scan
246246
# ------------------------------
247247
$AltDomainList = $DraftResults | where SubjectAltName -notlike "" | Select-Object SubjectAltName -ExpandProperty SubjectAltName
248248
$OrgDomainList = $DraftResults | where SubjectDomain -notlike "" | Select-Object SubjectDomain -ExpandProperty SubjectDomain
249-
$DomainList = $AltDomainList+$DomainList | Select-Object @{Name="DomainName";Expression={$_}} | Sort-Object DomainName -Unique
249+
$DomainList = $AltDomainList+$DomainList | Select-Object @{Name="DomainName";Expression={$_}} |
250+
ForEach-Object{
251+
$_.DomainName -replace("\*.","")
252+
} | Sort-Object -Unique
250253
$DomainCount = $DomainList.count
251254
Write-Verbose "$DomainCount unique domains found."
252255

0 commit comments

Comments
 (0)