Command line tool for decrypting vim-blowfish-encrypted files.
Project description
Command line tool for decrypting vim-blowfish-encrypted files.
As of version 7.3 vim offers built in blowfish encryption/decryption. Unfortunately the resulting files can only be read back by vim, precluding batch processing or scripting. Also longevity of encrypted data is a concern if a program with the dependencies and size of vim is required to unlock it.
This project provides a very simpe vimdecrypt Python module for decrypting blowfish-encoded file objects, as well as the vimdecrypt command line tool for decrypting files to stdout.
encryption methods
Vimdecrypt supports only blowfish2 encryption. Files encrypted using either zip or blowfish should be converted using :set cm=blowfish2 prior to using this tool.
requirements
Besides Python 3, vimdecrypt requires any one of PyCryto, PyCryptoDome or blowfish to be installed.
installation
Both the Python module and the command line tool are installable via setuptools:
$ python setup.py install (--user)
usage
With ~/.local/bin in your executable path, decrypt any file to stdout using:
$ vimdecrypt [path]
If the path argument is omitted then data is read from stdin:
$ cat somefile | vimdecrypt
Note that the password is obtained via GNU getpass which does not interfere with stdin/stdout redirection.
The Python module defines only the decrypt method:
>>> import vimdecrypt >>> with open('somefile', 'rb') as f: >>> text = vimdecrypt.decrypt(f)
credits
Thanks to [@nlitsme](https://github.com/nlitsme) for demonstrating blowfish decryption in Python. His identically named vimdecrypt project supports multiple encryption methods as well as password cracking.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file vim-decrypt-2.0.0.tar.gz
.
File metadata
- Download URL: vim-decrypt-2.0.0.tar.gz
- Upload date:
- Size: 37.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2a4f03742b85d94ee630e9e368d09c23c431f93c21edd1d27f795ab229b5d7e |
|
MD5 | 2463e0f327d667b692ba47361e53f2d6 |
|
BLAKE2b-256 | 042e8a451aa1739b154e2182375a925410154ba4a69bb41b69b57c465fd6d037 |
File details
Details for the file vim_decrypt-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: vim_decrypt-2.0.0-py3-none-any.whl
- Upload date:
- Size: 27.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea64f2904f11cd462f309d6ac91e842867ba5c26b4805ae89b87a72d0c0e4308 |
|
MD5 | 407c5058ff6f8117d054d85e68dd58fb |
|
BLAKE2b-256 | 0e767e19f33488b029064284273ac7e461a9550ca6086d8f22426ff2c5439b3c |