mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-12-04 20:47:25 +00:00
533f61f67a
Yes, these are two more major dependencies for mitmproxy, but if we're going to do all the cool things I want to do with SSL certs, there is no other way.
18 lines
280 B
Python
Executable File
18 lines
280 B
Python
Executable File
#!/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
|
|
|
|
|