blob: 976a15769728902a1f23eb02e6b33ed0b27a3440 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/usr/bin/env python
from __future__ import print_function
import base64
import sys
pkFile = open(sys.argv[1], 'rb').readlines()
base64Key = ""
inCert = False
for line in pkFile:
if line.startswith(b"-"):
inCert = not inCert
continue
base64Key += line.strip()
print(base64.b16encode(base64.b64decode(base64Key)).lower())
|