Last active
July 22, 2016 22:28
-
-
Save NonlinearFruit/7b6f72f97f0d70086f3f229fbf23850f to your computer and use it in GitHub Desktop.
Kruptos is an minimalist password manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function kruptos | |
{ | |
if [[ $# -eq 1 ]]; then | |
DOWHAT="$1" | |
else | |
DOWHAT="d" | |
fi | |
FOLDER="~/.kruptos" | |
FROYO="/.phrazein" | |
if [[ $DOWHAT == "d" ]]; then | |
#Decrypt | |
# openssl aes-256-cbc -d -in $FOLDER.tar.gz.aes | tar -xz -f - && rm $FOLDER.tar.gz.aes | |
pushd . &>/dev/null | |
cd ~/ | |
openssl aes-256-cbc -d -in .kruptos.tar.gz.aes | tar -xz -f - --strip-components=2 && rm ~/.kruptos.tar.gz.aes | |
popd &>/dev/null | |
elif [[ $DOWHAT == "e" ]]; then | |
#Encrypt | |
# tar -zcf - $FOLDER | openssl aes-256-cbc -out $FOLDER.tar.gz.aes -kfile $FOLDER$FROYO && rm -r $FOLDER | |
tar -zcf - ~/.kruptos | openssl aes-256-cbc -out ~/.kruptos.tar.gz.aes -kfile ~/.kruptos/.phrazein && rm -r ~/.kruptos | |
elif [[ $DOWHAT == "i" ]]; then | |
#Initialize | |
# mkdir $FOLDER | |
# cat barium $FOLDER/$FROYO | |
mkdir ~/.kruptos | |
echo pswd > ~/.kruptos/.phrazein | |
else | |
echo "$DOWHAT is not an acceptable flag" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment