Skip to content

Instantly share code, notes, and snippets.

@nusenu
Created February 3, 2016 22:07
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/afc9a399949b242f4240 to your computer and use it in GitHub Desktop.
Save nusenu/afc9a399949b242f4240 to your computer and use it in GitHub Desktop.
When pointed to one ore more tor datadirs (NOT files) it will show the expire dates of ed25519 certs
#!/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