凌的博客

您现在的位置是: 首页 > 学无止境 > python > 

python

python 生成ssl证书

2021-11-18 python 1906
# ! /usr/bin/python
# -*- coding: utf-8 -*-

import pexpect
import sys

number = len(sys.argv)
child = pexpect.spawn("openssl " + sys.argv[1])
for num in range(2, number):
    child.expect('(.+):')
    child.sendline(sys.argv[num])

result = child.before.decode()


文章评论

0条评论