Created
September 17, 2009 08:13
-
-
Save jiphex/188400 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# Unpostmap - reverse postmap'ed data | |
import os,sys,datetime | |
try: | |
import bsddb | |
hashed = bsddb.hashopen(sys.argv[1], 'r') | |
print "# hashed by unpostmap (%s)"%sys.argv[1] | |
for key in hashed: | |
print "%s %s" % (key, hashed[key]) | |
except KeyError: | |
print "Usage: %s virtual.db" % sys.argv[0] | |
except ImportError: | |
print "Couldn't load BDB interface - This won't work on Python >3." | |
print "If you're running debuntu: aptitude install python-bsddb3" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment