History backend that can encrypt the xonsh shell commands history.
Project description
History backend that encrypt the xonsh shell commands history file
to prevent extracting sensitive data from the commands history
(keys, passwords, hosts, names).
If you like the idea click ⭐ on the repo and tweet now.
Installation
To install use pip:
xpip install xontrib-history-encrypt
# or: xpip install -U git+https://github.com/anki-code/xontrib-history-encrypt
Usage
xontrib load history_encrypt
# Now your commands will be managed by xontrib-history-encrypt.
history info
# backend: xontrib-history-encrypt
# sessionid: 374eedc9-fc94-4d27-9ab7-ebd5a5c87d12
# filename: /home/user/.local/share/xonsh/xonsh-history-encrypt.txt
# commands: 1
Encryption type
You can set the encryption type before loading the xontrib:
-
$XONSH_HISTORY_ENCRYPT_TYPE = 'base64'
(default) - command's text encoding but without encryption. It can save from thoughtless full file system scanning for keywords (i.e. password, key) as well as the reading by not experienced user who trying to read history file. -
More strong solutions are in the future. Feel free to help.
Known issues
Work in progress
The xontrib now is in proof of concept stage and you can faced with speed issues or another. Your thought and PRs are appreciated.
The history will be not saved in case of xonsh crash
The current implementation of history management is simple and when xonsh crash the history will be lost too.
Use history flush
command to force writing to the disk before experiments.
Credits
- This package is the part of ergopack - the pack of ergonomic xontribs.
- This package was created with xontrib cookiecutter template.
Project details
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 xontrib-history-encrypt-0.0.2.tar.gz
.
File metadata
- Download URL: xontrib-history-encrypt-0.0.2.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54c87529e1d1513ca79f854699ead8729cac8a59e99aa48b1073aaae9b377322 |
|
MD5 | 223326a69c0170740efe426868d0f6f2 |
|
BLAKE2b-256 | 3af60101def1d70509730ae5ad184c632d0222edf52d6e565287c0889143577b |
File details
Details for the file xontrib_history_encrypt-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: xontrib_history_encrypt-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccbef0dbe936c0f04f68322424358bce31727368390ca5f2d3925c25df9d09fe |
|
MD5 | af6d3f2f21ff0de1f6aacea7d9b59058 |
|
BLAKE2b-256 | b2d7253b89f9fb0daffd28d95f85b95681d25ae93d3267dd07287bb6684de8b1 |