From 82e309d4fb7cc1695d9c97aab0af10138f5783c2 Mon Sep 17 00:00:00 2001 From: Robin Moisson Date: Thu, 28 Dec 2017 12:32:09 +0100 Subject: [PATCH] update readme for CLI --- README.md | 24 ++++++++++++++++++++++++ cli/README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 cli/README.md diff --git a/README.md b/README.md index 569c6d6..3a85e0a 100644 --- a/README.md +++ b/README.md @@ -18,3 +18,27 @@ AES-256 is state of the art but brute-force/dictionary attacks would be trivial The concept is simple but this is a side project - not purporting to be bulletproof, feel free to contribute or report any thought to the GitHub project ! +## CLI + +Staticrypt is available through npm as a CLI, install with `npm install -g staticrypt` and use as follow: + + Usage: staticrypt [options] + + Options: + --help Show help [boolean] + --version Show version number [boolean] + -e, --embed Whether or not to embed crypto-js in the page (or use an + external CDN) [boolean] [default: false] + -o, --output File name / path for generated encrypted file + [string] [default: null] + -t, --title Title for output HTML page + [string] [default: "Protected Page"] + -i, --instructions Special instructions to display to the user. + [string] [default: null] + +Example usages: + +- `staticrypt test.html mysecretpassword` -> creates a `test_encrypted.html` file +- `find . -type f -name "*.html" -exec staticrypt {} mypassword \;` -> create encrypted files for all HTML files in your directory + +Thanks [Aaron Coplan](https://github.com/AaronCoplan) for bringing the CLI to life ! diff --git a/cli/README.md b/cli/README.md new file mode 100644 index 0000000..fa171b7 --- /dev/null +++ b/cli/README.md @@ -0,0 +1,42 @@ +# StatiCrypt + +Based on the [crypto-js](https://github.com/brix/crypto-js) library, StatiCrypt uses AES-256 to encrypt your input with your passphrase and put it in a HTML file with a password prompt that can decrypted in-browser (client side). + +You can then upload your static html file anywhere and it'll be password protected (see [how it looks](https://robinmoisson.github.io/staticrypt/example.html)). + +Obviously, pick a lengthy passphrase ! + +## HOW IT WORKS + +StatiCrypt generates a static, password protected page that can be decrypted in-browser: just send or upload the generated page to a place serving static content (github pages, for example) and you're done: the javascript will prompt users for password, decrypt the page and load your HTML. + +StatiCrypt basically encrypts your page and puts everything with a user-friendly way to use a password in the new file. + +AES-256 is state of the art but brute-force/dictionary attacks would be trivial to do at a really fast pace: **use a long, unusual passphrase!** + +The concept is simple but this is a side project - if you have extra sensitive banking data you might want to use something else :) + +Feel free to contribute or report any thought to the [GitHub project](https://robinmoisson.github.io/staticrypt) ! + +## USAGE + +Staticrypt is available through npm as a CLI, install with `npm install -g staticrypt` and use as follow: + + Usage: staticrypt [options] + + Options: + --help Show help [boolean] + --version Show version number [boolean] + -e, --embed Whether or not to embed crypto-js in the page (or use an + external CDN) [boolean] [default: false] + -o, --output File name / path for generated encrypted file + [string] [default: null] + -t, --title Title for output HTML page + [string] [default: "Protected Page"] + -i, --instructions Special instructions to display to the user. + [string] [default: null] + +Example usages: + +- `staticrypt test.html mypassword` -> creates a `test_encrypted.html` file +- `find . -type f -name "*.html" -exec staticrypt {} mypassword \;` -> create encrypted files for all HTML files in your directory (recursively)