initial commit

This commit is contained in:
2024-09-12 04:56:50 -06:00
commit e68400ebc9
5 changed files with 91 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
+22
View File
@@ -0,0 +1,22 @@
# hiddencrypto
Silly lil script for using [scrypt](https://github.com/Tarsnap/scrypt), [secure-delete (srm)](https://github.com/BlackArch/secure-delete), and tar to open and close an encrypted (scrypt) and compressed (bz2) and shred (srm) any lingering data immediately.
## Back up your shit
* This script is probably as unstable as I am and will probably end up nuking your files
* If you lose your passphrase or type it in wrong twice on encryption, your data has gone bye bye
* For real, back up your shit
* Do not trust me or my code
## Usage
To install:
`sh hidden.sh install`
To encrypt:
`sh hidden.sh enc`
To decrypt:
`sh hidden.sh dec`
## License
Distributed under the [WTFPL Version 2](//www.wtfpl.net/) [![WTFPL](assets/wtfpl-badge.png)](//www.wtfpl.net/)
See [assets/COPYING.txt](COPYING.txt) for text
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

+60
View File
@@ -0,0 +1,60 @@
#!/bin/sh
# fail on error
set -e
dir_to_encrypt=./to_encrypt
encrypted_archive_name=./.volume.bin
encrypted_volume_name=./encrypted_volume.tar.bz2
encrypty(){
echo "Compressing Directory..."
tar cfj $encrypted_volume_name $dir_to_encrypt
# check success of previous or die
echo "Sucesfully Compressed, Shredding Directory..."
srm -rz $dir_to_encrypt
# check success of previous or die
echo "Successfully Shredded Directory, Encrypting. Please Input Passphrase..."
scrypt enc $encrypted_volume_name $encrypted_archive_name
# check success of previous or die
echo "Successfully Encrypted, Shredding Archive..."
srm -rz $encrypted_volume_name
# check success of previous or die
echo "Success: Done"
}
decrypty(){
echo "Starting..."
echo "Decrypting. Please Input Passphrase..."
scrypt dec $encrypted_archive_name $encrypted_volume_name
# check success of previous or die
echo "Successfully Decrytped, Shredding Encrypted Archive..."
srm -rz $encrypted_archive_name
# check success of previous or die
echo "Successfully Shredded Encrypted Archive, Decompressing..."
tar xfj $encrypted_volume_name
# check success of previous or die
echo "Successfully Decompressed Decrypted Archive, Shredding Decrypted Archive..."
srm -rz $encrypted_volume_name
# check success of previous or die
echo "Success: Done"
}
if [ "$1" = "enc" ]; then
encrypty
elif [ "$1" = "dec" ]; then
decrypty
elif [ $1 = "install" ]; then
if ! [ -f "$(command -v scrypt)" ] && [ -f "$(command -v srm)" ] && [ -f "$(command -v tar)" ]; then
echo "Needed Applications Not Found, Installing..."
sudo apt install scrypt secure-delete tar
echo "Success: Installed"
fi
if ! [ -d $dir_to_encrypt ]; then
echo "$dir_to_encrypt Not Found, Creating..."
mkdir $dir_to_encrypt
fi
else
echo "Usage:\nEncrypt:\n\t./hidden.sh enc\nDecrypt:\n\t./hidden.sh dec\nInstall:\n\t./hidden.sh install"
fi
+5
View File
@@ -0,0 +1,5 @@
srm is from the secure-delete package
srm -rz to_encrypt
srm -rz .volume.bin
srm -rz encrypted_volume.tar.bz2