I’ve decided to ditch revelation. I’ve used it for several years to manage my passwords but development seems to have stalled. The author’s website is currently inaccessible. So it is over for me. Read on for the method I used to convert my database of passwords.
I’ve switched to KeePassX because it seems better supported and has the features I want. Wzzrd produced a script to perform the conversion. His script is in Ruby, a language I’m not particularly interested in. Moreover, his script did not quite do what I wanted so I converted his script to python and adapted it to my needs. I’m attaching the script to this post: revelation-to-keepassx Anybody wanting to use this script should be warned that it is throwaway code and that I implemented just as much as I needed.
The way I converted my data was:
1. Export the data from revelation into an unencrypted XML file. (It is advisable to export it to a file in volatile memory like /dev/shm. This minimizes the risk of leaving unencrypted data in free blocks after the conversion is done.)
2. I ran my script without options:
$ revelation-to-keepassx /dev/shm/revelation-export.xml > /dev/shm/keepassx.xml
(Note that I save the result in /dev/shm again.)
This resulted in the output:
revelation-to-keepassx: ERROR: stripped following ids: generic-keyfile, generic-location, generic-certificate, creditcard-cardtype
I checked my input file to verify that I would not lose anything important if <field> elements with the above ids were to be stripped from the output instead of converted.
3. I reran the script as above but with the “-i” option which tells the script to ignore the stripped ids.
4. I imported the resulting file into KeePassX.
I’ve inspected the final database and found no evident problem. To be on the safe side I used gpg to encrypt the XML file I exported from revelation so that even if I eventually run into trouble and revelation is not easily installable, I can visually inspect the XML file.
Interesting. I switched my main scripting / programming to Python (for professional reasons) a couple months ago. I had planned to rewrite the script in Python if I had some time, but you beat me to it. Maybe I’ll take a look sometime and see if I can expand on it a bit.
You can sure use my script if you want to produce something more sophisticated in python. Usual caveats: it is throwaway code so not very robust and it was designed to cater to my needs.
I found this error
python revelation-to-keepassx.py revel.xml > keepass.xml -i
Traceback (most recent call last):
File “revelation-to-keepassx.py”, line 124, in
parse_folder(old_root, new_root, 0)
File “revelation-to-keepassx.py”, line 62, in parse_folder
parse_folder(item, element, group_depth + 1)
File “revelation-to-keepassx.py”, line 73, in parse_folder
ElementTree.SubElement(element, “icon”).text = str(from_type_to_icon[item.get(“type”)])
KeyError: ‘ftp’
This is not surprising. Here is the key passage from my original post:
I did not need to support the “ftp” type so I did not implement conversion for it. I encourage you to modify the code to suit your needs.
Thank you for your script. i’d just adjusted it for my needs and it worked fine.
Thanks for the report. I’m glad it was helpful.
Pingback: Миграция с revelation на KeePassX : Дмитрий Петров
Just ran across this: Need to convert to Keepass so I can use jbiKeePass on iPhone. Worked a treat even though I’ve never had to hack a python script before. Many thanks for the script.
Sadly in my case script worked pretty much worse han expected, so I hacked it further and:
— It knows about “Shell”, “FTP” and “email” fields
— It gracefully skips unfilled “Expiry date” and some other fields
— It supports some more FTP / Shell / email / Credit card specific fields.
Anyway, “I implemented just as much as I needed” too :).
So if the original author’s script fails and you know little about programming, try it:
http://pastebin.com/f221151ff
P/S to the author: thank you for a nice piece of Python. I bet some day I’ll learn it
Oops. It seems I forgot to comment. Let me fix this omission:
Thank you, Oleg, for sharing your changes.
added some support for Databases.
http://pastebin.com/mR2RnwsS
Thank your for sharing, jendrek.
Your update works great!
Hi, I just wanted to say that I came across your script and have successfully converted my revelation password database. Many thanks for taking the time to write this, and also to the other contributors.
Andrew, thanks for the feedback. I’m glad people are still finding the script useful.
Thank you for your script! Maybe meanwhile, there have been some changes to revelation, so I simply put your parse_folder() function into a try…except block and just repaired the missing values by hand. I must admit that this is the lazy man solution 😉
I’m glad you found it useful. My script was a lazy man’s solution too. 🙂
Just wanted to say thank you. This script is still coming in handy. Did the job for me wonderfully!
Hi!
Thanks for the script – it was very helpful.
Here is (assuming your blog’s code tags can deal with Python indenting!) a minor update to jendrek’s version to add support for the ‘Notes’ field, and to fix a bug that causes the title field of database entries to get clobbered by the database name.
Thanks, Chris. I’ve edited your post to replace <code> with <pre>. The <pre> tag is what you want to preserve indentation.
Thanks so much for this script, with the “notes” solution provided 2 years ago it worked like a charm!
As Fedora decided to throw out revelation in Fedora 31, I stumbled over your blog post and the various helpful comments here. After playing around with the scripts above I finally found out that the current keepass (I tested version 2.42.1) can directly import keepass xml files. I’m just writing this here for any other users who has the same issue and want’s to save some time 🙂