Skip to content
Open
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
23 changes: 9 additions & 14 deletions Detect-SSLmitm.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -70,29 +70,24 @@ function Get-CertHash

}

$Uris = @(
"www.google.com"
"mail.google.com"
"www.whitehouse.gov"
"www.costco.com"
"www.facebook.com"
"www.usbank.com"
"www.twitter.com"
"www.linkedin.com"
)

function Get-GoldenHashes
{
$certHashes = @{}

foreach ($uri in $Uris) {
foreach ($uri in Get-Content .\domains.txt) {
Write-Output "Getting golden certificate hash for $uri"
$hash = Get-CertHash -Uri "https://$uri"
try {
$hash = Get-CertHash -Uri "https://$uri"
}
catch {
Write-Output "$uri does not support https, skipping!"
continue
}
$certHashes.add($uri, $hash )

}

# print out the hash table for easy copy and paste back into this script as the $goldenHashes variable
Write-Host -ForegroundColor Green "[*] Done, now copy and paste these golden hashes into the goldenHashes array at the top of this script."
$certHashes.Keys | % { "`t""$_"" = ""$($certHashes.Item($_))"";" }
}
}
Loading