Git Product home page Git Product logo

warshield's Introduction

Warshield

license npm

WarShield is a CLI tool made to encrypt and decrypt your files with a password using AES-256. It was made to ensure a full files protection inside a storage device. If those are lost or stolen, malicious peoples can take over your data.

It uses AES-256 GCM (Galois/Counter Mode) with random 16 bytes initialization vector. Key is hash in a 256 bits key with SHA-512 using random 64 bytes salt and rounds (between 3000 and 9000 rounds).

How to install

NodeJS minimal required version is v10.0.0.
To install as a CLI tool, launch npm install -g warshield.

How to use

Usage: warshield [options] <mode> <dir>

Options:
  -V, --version             output the version number
  -v, --verbose             enable verbosity
  -t, --trace               enable stacktrace
  -p, --tmp <directory>     change temporary directory
  -h, --help                output usage information

Commands:
  encrypt [options] <file>  encrypt a file or all files in a directory
  decrypt [options] <file>  decrypt a file or all files in a directory

warshield's People

Contributors

anto-christo avatar dependabot[bot] avatar quantumsheep avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

warshield's Issues

Implement verbose mode

Implement -v/--verbose option.

WarShield needs to have less informations by default than now and a verbose mode to display every information.

Expected behavior without verbose:

Scanning files... Done!
Encrypting files... Done!
Elapsed time: 16.27s
Total encrypted files: 1653
Failed: 3 (read-only files)

Expected behavior with verbose:

Added file /etc/nginx/conf.d
Added file /etc/nginx/fastcgi.conf
Added file /etc/nginx/sites-available/default
Added file /etc/nginx/sites-enabled/default
Done encrypting file /etc/nginx/conf.d
Done encrypting /etc/nginx/fastcgi.conf
Done encrypting /etc/nginx/sites-available/default
Done encrypting /etc/nginx/sites-enabled/default
Finished encrypting files!
Elapsed time: 0.76s
Total encrypted files: 4
Failed: 0 (read-only files)

Interactive UI [suggestion]

Hi, I am here from your dev.to comment.

I have experience in building a couple of CLIs. I personally prefer CLIs that have an interactive UI. Below is the demo of a CLI that I built for merging PDF files.

demo

In case you are interested in having such an interactive UI for warshield, I'll be glad to help.
If such a UI is not required, let me know if there is anything else that I can do to contribute.
Thank you.

Implement glob option

Implement -g/--glob
Implement glob file searching

Command example
warshield encrypt -g "^[a].*$" will encrypt every files that start by the letter a.

TypeError: encryptFile(...).then(...).catch(...).finally is not a function

Hi,
I was trying to run the CLI. However, I am not able to encrypt any file and always get the following error no matter which file. (I tried to run on both Windows 10 and Ubuntu 18)

warshield-error

As per my knowledge, these files are not read-only and the user does have access to them.
What may be the possible reasons for this error?
Any help in this regard is appreciated. Thank you.

Same directory

I feel like decrypting the files in place or alongside the encrypted files is a default that is likely to cause disasters.
For instance, if used on an untrustworthy network share, you will end up writing the defenceless files to the network share.
With a usb stick, you might leave the unencrypted files on it (possibly having deleted most but not all).

I would have suggested a temporary directory, but even that doesn't get cleaned up even in case of a reboot in many cases, and users, not being able to locate it, might think it is gone.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.