locker - simpe secure archiver

From NAT, 7 Years ago, written in Bash, viewed 571 times.
URL https://code.nat.moe/view/a02a670e Embed
Download Paste or View Raw
  1. #!/bin/bash
  2.  
  3. function unlock {
  4.         echo "unlocking $1..."
  5.         cat $1 |  openssl aes-256-cbc -d -a -salt -k $2 | tar x
  6. }
  7.  
  8. function lock {
  9.         echo "locking $1..."
  10.         tar c $1 | openssl aes-256-cbc -a -salt -k $2 > $1.lock
  11. }
  12.  
  13. function help {
  14.         echo "locker: simpe file archiver encoded with aes-256-cbc"
  15.         echo "usage: locker lock <file/dir> <password>"
  16.         echo "       locker unlock <locked archive> <password>"
  17. }
  18.  
  19. echo "locker 0.1"
  20. echo "for help, type 'locker help'"
  21.  
  22. $*

Reply to "locker - simpe secure archiver"

Here you can reply to the paste above

captcha