diff options
author | lloyd <[email protected]> | 2010-03-02 14:36:11 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-02 14:36:11 +0000 |
commit | 6148e7cccc50023955ef7c3d86709c5197ae78e7 (patch) | |
tree | 4f316df5202699d25e5473160bd395262988b13b /doc/python | |
parent | 11c8570f6486caf871767265f687f0d4fe17d7e0 (diff) |
Make output more understandable
Diffstat (limited to 'doc/python')
-rwxr-xr-x | doc/python/cryptobox.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/python/cryptobox.py b/doc/python/cryptobox.py index 1968b40e1..f76ed6bc3 100755 --- a/doc/python/cryptobox.py +++ b/doc/python/cryptobox.py @@ -8,7 +8,7 @@ def main(args = None): args = sys.argv if len(args) != 3: - raise Exception("Bad usage") + raise Exception("Usage: <password> <input>"); password = args[1] input = ''.join(open(args[2]).readlines()) @@ -24,10 +24,12 @@ def main(args = None): try: plaintext = botan.cryptobox_decrypt(ciphertext, password + 'FAIL') except Exception, e: - print "Oops -- ", e + print "Good news: bad password caused exception: " + print e plaintext = botan.cryptobox_decrypt(ciphertext, password) + print "Original input was: " print plaintext if __name__ == '__main__': |