Skip to content

Commit

Permalink
Updated to support Tomb v2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
reiven committed Nov 3, 2016
1 parent 8a210a5 commit a4ec9a0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
11 changes: 8 additions & 3 deletions README.mkdn
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,21 @@ It relies on Python's subprocess module for Tomb command
execution. This project was inspired by pytomb which was included in
Tomb ./extras in the past but is no longer maintained.

This project is still under development. Any contributions are
greatly welcomed.

The included test.jpg image file is used to test the `tbury()` and
`texhume()` functions.

To speedup forge, an entropy generator such as
[haveged](http://www.issihosts.com/haveged/) can be installed.


Compatibity
----------

Current version requieres at least Tomb v2.2 to run.
If for any reason you need to use older Tomb version with tomber, please
install tomber v1.0.2


Installation
----------

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def read(fname):


setup(name='tomber',
version='1.0.1',
version='1.0.3',
description='a python Tomb (the Crypto Undertaker) wrapper',
long_description=read('README.mkdn'),
license="BSD",
Expand Down
2 changes: 1 addition & 1 deletion tomber/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def setUpClass(self):
self.passphrase2 = str(randrange(2 ** 64))
self.imagefile = '.'.join([self.pid, 'jpg'])
copyfile(
'/'.join([os.path.dirname(__file__), 'test.jpg']),
'/'.join([os.path.dirname(os.path.abspath(__file__)), 'test.jpg']),
self.imagefile)

@classmethod
Expand Down
24 changes: 12 additions & 12 deletions tomber/tomber.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def tforge(keyfile, passphrase, force=False):
cmd = ' '.join(['tomb',
'forge',
keyfile,
'--unsecure-dev-mode',
'--unsafe',
'--tomb-pwd',
sanitize_passphrase(passphrase),
'--no-color'])
Expand All @@ -83,7 +83,7 @@ def tlock(tombfile, keyfile, passphrase):
tombfile,
'-k',
keyfile,
'--unsecure-dev-mode',
'--unsafe',
'--tomb-pwd',
sanitize_passphrase(passphrase),
'--no-color'])
Expand All @@ -102,7 +102,7 @@ def topen(tombfile, keyfile, passphrase, mountpath=False):
tombfile,
'-k',
keyfile,
'--unsecure-dev-mode',
'--unsafe',
'--tomb-pwd',
sanitize_passphrase(passphrase),
'--no-color',
Expand All @@ -128,7 +128,7 @@ def tresize(tombfile, keyfile, passphrase, newsize):
tombfile,
'-k',
keyfile,
'--unsecure-dev-mode',
'--unsafe',
'--tomb-pwd',
sanitize_passphrase(passphrase),
'-s',
Expand All @@ -145,7 +145,7 @@ def tbury(keyfile, passphrase, imagefile):
'bury',
'-k',
keyfile,
'--unsecure-dev-mode',
'--unsafe',
'--tomb-pwd',
sanitize_passphrase(passphrase),
imagefile,
Expand All @@ -161,7 +161,7 @@ def texhume(keyfile, passphrase, imagefile):
'exhume',
'-k',
keyfile,
'--unsecure-dev-mode',
'--unsafe',
'--tomb-pwd',
sanitize_passphrase(passphrase),
imagefile,
Expand All @@ -177,7 +177,7 @@ def tpasswd(keyfile, newpassphrase, oldpassphrase):
'passwd',
'-k',
keyfile,
'--unsecure-dev-mode',
'--unsafe',
'--tomb-pwd',
sanitize_passphrase(newpassphrase),
'--tomb-old-pwd',
Expand All @@ -193,14 +193,14 @@ def tsetkey(oldkeyfile, tombfile, newkeyfile, newpassphrase, oldpassphrase):
"""
cmd = ' '.join(['tomb',
'setkey',
oldkeyfile,
tombfile,
'-k',
newkeyfile,
'--unsecure-dev-mode',
'--tomb-pwd',
sanitize_passphrase(newpassphrase),
oldkeyfile,
tombfile,
'--unsafe',
'--tomb-old-pwd',
sanitize_passphrase(newpassphrase),
'--tomb-pwd',
sanitize_passphrase(oldpassphrase),
'--no-color'])
return execute(cmd)
Expand Down

0 comments on commit a4ec9a0

Please sign in to comment.