mitmproxy/test/tools/getcert
2015-05-30 12:03:28 +12:00

11 lines
208 B
Python
Executable File

#!/usr/bin/env python
import sys
sys.path.insert(0, "../..")
import socket
import tempfile
import ssl
import subprocess
addr = socket.gethostbyname(sys.argv[1])
print ssl.get_server_certificate((addr, 443))