Skip to content

Instantly share code, notes, and snippets.

@nusenu
Created February 24, 2017 20:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nusenu/ff39ddf2095dd4d2c885c5a7cca0fa8a to your computer and use it in GitHub Desktop.
Save nusenu/ff39ddf2095dd4d2c885c5a7cca0fa8a to your computer and use it in GitHub Desktop.
given a list of datadir folders this short script will print the foldername followed by the timestamp the key in that folder will expire
#!/usr/bin/python
import time
import sys
files = sys.argv[1:]
for fi in files:
f = open(fi+'/keys/ed25519_signing_cert', 'rb')
x = f.read()
print fi.split('/')[-1] + ':\t\t' + time.ctime(int(x[35:38].encode('hex'),16)*3600)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment