本帖最后由 tianting002 于 2012-05-03 22:00 编辑
signs = os.popen("jarsigner -verify -verbose -certs %s" % (sys.argv[1]))
for y in signs:
if re.search(r"X.509",y):
print y,
X.509, CN=ippan, OU=WPC, O=Tencent, L=sz, ST=gd, C=86
X.509, CN=ippan, OU=WPC, O=Tencent, L=sz, ST=gd, C=86
X.509, CN=ippan, OU=WPC, O=Tencent, L=sz, ST=gd, C=86
X.509, CN=ippan, OU=WPC, O=Tencent, L=sz, ST=gd, C=86
X.509, CN=ippan, OU=WPC, O=Tencent, L=sz, ST=gd, C=86
X.509, CN=ippan, OU=WPC, O=Tencent, L=sz, ST=gd, C=86
X.509, CN=ippan, OU=WPC, O=Tencent, L=sz, ST=gd, C=86
X.509, CN=ippan, OU=WPC, O=Tencent, L=sz, ST=gd, C=86
X.509, CN=ippan, OU=WPC, O=Tencent, L=sz, ST=gd, C=86
X.509, CN=ippan, OU=WPC, O=Tencent, L=sz, ST=gd, C=86
X.509, CN=ippan, OU=WPC, O=Tencent, L=sz, ST=gd, C=86
X.509, CN=ippan, OU=WPC, O=Tencent, L=sz, ST=gd, C=86
X.509, CN=ippan, OU=WPC, O=Tencent, L=sz, ST=gd, C=86
X.509, CN=ippan, OU=WPC, O=Tencent, L=sz, ST=gd, C=86
X.509, CN=ippan, OU=WPC, O=Tencent, L=sz, ST=gd, C=86
X.509, CN=ippan, OU=WPC, O=Tencent, L=sz, ST=gd, C=86
有什么字符串方法可以只取其中唯一的一行?
X.509, CN=ippan, OU=WPC, O=Tencent, L=sz, ST=gd, C=86
|