mitmproxy/test/tools/getcn

18 lines
280 B
Plaintext
Raw Normal View History

#!/usr/bin/env python
import sys
sys.path.insert(0, "../../")
from libmproxy import certutils
if len(sys.argv) > 2:
port = int(sys.argv[2])
else:
pport = 443
cn, san = certutils.get_remote_cn(sys.argv[1], port)
print cn
if san:
for i in san:
print "\t", i
2012-02-27 02:21:05 +00:00