mitmproxy/test/helper_tools/getcert

11 lines
209 B
Plaintext
Raw Normal View History

2012-02-27 02:21:05 +00:00
#!/usr/bin/env python
import sys
sys.path.insert(0, "../..")
2015-05-30 00:03:28 +00:00
import socket
import tempfile
import ssl
import subprocess
2012-02-27 02:21:05 +00:00
addr = socket.gethostbyname(sys.argv[1])
2016-04-14 05:34:28 +00:00
print(ssl.get_server_certificate((addr, 443)))