Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- DIR="path/folder"
- DIR2="path/.folder"
- pass="Z2FsdGVkX18vy4f4QRB3qnb5vIWR0x+tlZmdAmPxX8Y="
- input=""
- result=""
- basic()
- {
- if [ -d "$DIR" ]
- then
- clear
- mv $DIR $DIR2
- elif [ -d "$DIR2" ]
- then
- echo -n ": "
- read -rs input
- result=$(echo "$pass"| openssl enc -aes-128-cbc -a -d -salt -pass pass:wtf)
- if [ "$result" = "$input" ]
- then
- clear
- mv $DIR2 $DIR
- else
- clear
- fi
- else
- :
- fi
- exit
- }
- open()
- {
- if [ -d "$DIR" ]
- then
- clear
- mv $DIR $DIR2
- elif [ -d "$DIR2" ]
- then
- echo -n ": "
- read -rs input
- result=$(echo "$pass"| openssl enc -aes-128-cbc -a -d -salt -pass pass:wtf)
- if [ "$result" = "$input" ]
- then
- clear
- mv $DIR2 $DIR
- open $DIR
- else
- echo "error"
- fi
- else
- :
- fi
- exit
- }
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Main ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- if [ $# -eq 0 ]
- then
- basic
- elif [ $# -eq 1 ]
- then
- if [ "$1" = "-o" ]
- then
- open
- else
- :
- fi
- fi
- clear
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End of File ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement