Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #------------------------------------------------------------
- # To get file back from image
- #
- # $ ./fromcolor.sh imagefilename.png > restoredfile.name
- #
- # You will be prompted for your encryption key/passphrase
- # See matching tocolor.sh http://pastebin.com/jgXkjY78
- #
- # See update version of this script here http://pastebin.com/jCQMH5kW
- #------------------------------------------------------------
- # while loop
- convert "$1" txt: | cut -f 2 -d'#' |cut -f 1 -d' ' | (
- while IFS= read c
- do
- let counter+=1
- case "$c" in
- "000001") color="A" ;;
- "000002") color="B" ;;
- "000003") color="C" ;;
- "000004") color="D" ;;
- "000005") color="E" ;;
- "000006") color="F" ;;
- "000007") color="G" ;;
- "000008") color="H" ;;
- "000009") color="I" ;;
- "000010") color="J" ;;
- "000011") color="K" ;;
- "000012") color="L" ;;
- "000013") color="M" ;;
- "000014") color="N" ;;
- "000015") color="O" ;;
- "000016") color="P" ;;
- "000017") color="Q" ;;
- "000018") color="R" ;;
- "000019") color="S" ;;
- "000020") color="T" ;;
- "000021") color="U" ;;
- "000022") color="V" ;;
- "000023") color="W" ;;
- "000024") color="X" ;;
- "000025") color="Y" ;;
- "000026") color="Z" ;;
- "000027") color="." ;;
- esac
- if [ $color ]; then
- echo -n $color
- fi
- done
- ) | tr '.' " " |codegroup -d |ccrypt -d
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement