Ricardo Cerqueira | d8eb47d | 2013-10-01 20:42:45 +0100 | [diff] [blame^] | 1 | #!/usr/bin/python |
2 | |||||
3 | import base64 | ||||
4 | import sys | ||||
5 | import os | ||||
6 | |||||
7 | pkFile = open(sys.argv[1], 'rb').readlines() | ||||
8 | base64Key = "" | ||||
9 | inCert = False | ||||
10 | for line in pkFile: | ||||
11 | if line.startswith("-"): | ||||
12 | inCert = not inCert | ||||
13 | continue | ||||
14 | |||||
15 | base64Key += line.strip() | ||||
16 | |||||
17 | print base64.b16encode(base64.b64decode(base64Key)).lower() |