1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #!/bin/bash
- # Coding: utf-8
- # Editor: www.geany.org
- # Created 2018-04-30
- #_sudo_apt_install_ steghide zenity
- source $HOME/.SCR/lib.sh
- echo "1 arg - pic_fullpath"
- echo "2 arg - date_fullpath"
- if (( "$#" < 2))
- then
- pic_fullpath=`zenity --file-selection --title="Select pic_fullpath"`
- fun_echo_variable pic_fullpath
- date_fullpath=`zenity --file-selection --title="Select date_fullpath"`
- fun_echo_variable date_fullpath
- else
- pic_fullpath="$1"
- date_fullpath="$2"
- fi
- dir_wp="$HOME/DATA2/Wallpapers/android"
- read hash_bw < "$HOME/.ssh/hash_bw"
- read -s -p "Enter password:" pass
- hash="$(echo "$pass" | sha256sum | cut -c -8)"
- if [ "$hash" == "$hash_bw" ]
- then
- fun_create_directory "$dir_wp"
- cd "$dir_wp"
- new_pic_filename="$(basename "$pic_fullpath")"
- fun_echo_variable dir_wp hash_bw hash pic_fullpath date_fullpath new_pic_filename
- rm -rf "$dir_wp/$new_pic_filename"
- steghide embed -ef "$date_fullpath" -p "$pass" -cf "$pic_fullpath" -sf "$new_pic_filename"
- if [ "$?" -eq "0" ] # если кода возврата 0
- then
- date_pic_file="$(stat "$new_pic_filename" | grep "Modify" | cut -f2-4 -d" ")"
- find . -exec touch -a --date="$date_pic_file" {} \;
- find . -exec touch -m --date="$date_pic_file" {} \;
- fi
- fun_for_continue_enter_password
- touch "/tmp/backup_wallpaper_0"
- else
- echo "$hash_bw not correct"
- fi
|