Skip to content

Instantly share code, notes, and snippets.

@roman-yepishev
Created February 19, 2012 12:09
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 roman-yepishev/1863474 to your computer and use it in GitHub Desktop.
Save roman-yepishev/1863474 to your computer and use it in GitHub Desktop.
twisted-ssh.py gdbm password export
#!/usr/bin/env python
import gdbm
import sys
from datetime import datetime
print """# Updated: %s
# SSH creds for attack attempts on my server.
# If your password is listed here, CHANGE IT RIGHT NOW
#""" % (datetime.now().isoformat())
db = gdbm.open(sys.argv[1])
print "# %d entries\n#" % (len(db.keys()), )
for key in sorted(db.keys()):
print "%s" % (key, )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment