CLI for revelation
By Pierre-Yves on Wednesday, September 14 2011, 15:46 - Général - Permalink
A small CLI for the password manager tool, revelation
English version (French version)
Revelation is a very nice password management tool, I have been using it for a while and I quite like it.
However, you don't always want to have it on your computer but you would prefer to be able to query it through ssh or so. At least it is my case :-)
I therefore wrote a small CLI in python which relies on revelation's API to browse and retrieve password from a revelation database.
Show the content of the database:
$ ./revelationcli.py revelation.db --showtree Password: Database: | \_ test1 | \_ test2 | \_ folder1 | | \_ folder2 | | | \_ test4 | | | \_ test2 | | \_ test3
Show information about one password:
$ ./revelationcli.py revelation.db test4 Password: Name : test4 Database : test
Show all the information about one password (included the password itself):
$ ./revelationcli.py revelation.db test4 --show Password: Name : test4 Password : HYoJx7W8 Database : test
The project is for the moment at: http://project.pingoured.fr/revelationcli/
Let's see if it is interesting enough to make it more open :-)
Comments
I didn't know there was an API! Where is it documented (if at all)?
I see this as becoming a nice solution for people like me who want to share passwords between computers via a web-accessible page (via my own hosted web server).
A page could be written that uses the script to access and display the contents of revelation's DB ... Just thinking out loud but it feels possible.
Well, actually, there isn't a clear API, I just import revelation's class and made use of its code.
It's still pretty straight forward though, the hardest part was the iteration over the different level of the GtkTreeStore, but even that is not too hard :-)
Feel free to pick what you like/need in the script!
jan@srv:~/revelationcli$ ./revelationcli.py ../revelation --showtree
/usr/lib/pymodules/python2.6/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
warnings.warn(str(e), _gtk.Warning)
/usr/lib/python2.6/dist-packages/revelation/bundle/AfSplitter.py:41: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
import sha, string, math, struct
/usr/lib/python2.6/dist-packages/revelation/bundle/luks.py:64: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import os, math, struct, stat, sha, md5
Traceback (most recent call last):
File "./revelationcli.py", line 29, in <module>
import argparse
ImportError: No module named argparse
any idea what's missing here? revelation-0.4.11 on debian headless
@loswillios, you need to have python-argparse installed.
The other warning refers to the fact that GTK is not installed but that might still work (worth a try).
thanks, that worked
Cool ! :-)