feat: add infrastructure audit and diagnostic helper scripts

This commit is contained in:
2026-11-06 12:37:49 -05:00
parent 06c203485f
commit aea8608f3d
44 changed files with 1141 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
import socket
import ssl
def check_cert(domain, ip="174.106.252.96"):
print(f"=== Checking SSL for {domain} at {ip}:443 ===")
ctx = ssl.create_default_context()
ctx.check_hostname = True
try:
with socket.create_connection((ip, 443), timeout=5) as sock:
with ctx.wrap_socket(sock, server_hostname=domain) as ssock:
cert = ssock.getpeercert()
print("Cert Subject:", cert.get('subject'))
print("SAN:", cert.get('subjectAltName'))
print("Cipher:", ssock.cipher())
print("ALPN:", ssock.selected_alpn_protocol())
except Exception as e:
print("SSL Error:", e)
check_cert('pihole1.snarfnet.net')
check_cert('pihole2.snarfnet.net')
check_cert('dns1.snarfnet.net')
check_cert('dns2.snarfnet.net')