Initial commit...
This commit is contained in:
BIN
Shell Projects/CLIPasswd/DarkCrypt.png
Normal file
BIN
Shell Projects/CLIPasswd/DarkCrypt.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
46
Shell Projects/CLIPasswd/passWD.sh
Executable file
46
Shell Projects/CLIPasswd/passWD.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
|
||||
function main() {
|
||||
exec 3>&1
|
||||
MENU=$(dialog --title "DarkCrypt" \
|
||||
--menu "\nControls - UP/DOWN/[Enter]\n" 10 25 0 \
|
||||
"S" "Save New Entry" \
|
||||
"G" "Get Old Entry" \
|
||||
"E" "Exit" 2>&1 1>&3);
|
||||
|
||||
case "${MENU}" in
|
||||
"S" ) saveToDB
|
||||
;;
|
||||
"G" ) ##getPasswd
|
||||
;;
|
||||
"G" ) exit;
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function saveToDB() {
|
||||
# height, width, formheight
|
||||
exec 3>&1
|
||||
DATA=$(dialog --backtitle "DarkCrypt" --title "Save" \
|
||||
--form "" 14 48 0 \
|
||||
"Title:" 1 1 "" 1 20 20 30 \
|
||||
"Description:" 2 1 "" 2 20 20 30 \
|
||||
"Username:" 3 1 "" 3 20 20 30 \
|
||||
"Password:" 4 1 "" 4 20 20 30 \
|
||||
"URL:" 5 1 "" 5 20 20 30 \
|
||||
"Tags:" 6 1 "" 6 20 20 30 2>&1 1>&3)
|
||||
|
||||
if test $? -eq 0
|
||||
then
|
||||
runSave $DATA;
|
||||
main;
|
||||
else
|
||||
main;
|
||||
fi
|
||||
}
|
||||
|
||||
function runSave() {
|
||||
echo "$1" > result.txt
|
||||
}
|
||||
|
||||
main;
|
Reference in New Issue
Block a user