mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 16:17:49 +00:00
17 lines
332 B
Plaintext
17 lines
332 B
Plaintext
|
#!/usr/bin/env python
|
||
|
import sys
|
||
|
sys.path.insert(0, "../../")
|
||
|
from netlib import certutils
|
||
|
|
||
|
if len(sys.argv) > 2:
|
||
|
port = int(sys.argv[2])
|
||
|
else:
|
||
|
port = 443
|
||
|
|
||
|
cert = certutils.get_remote_cert(sys.argv[1], port, None)
|
||
|
print "CN:", cert.cn
|
||
|
if cert.altnames:
|
||
|
print "SANs:",
|
||
|
for i in cert.altnames:
|
||
|
print "\t", i
|