diff --git a/captcha/captcha.sh b/captcha/captcha.sh index ce87eac..93acd8f 100755 --- a/captcha/captcha.sh +++ b/captcha/captcha.sh @@ -108,14 +108,15 @@ SOMME() get_random RAND_INDEX=$(($R % ${#TRANSFORMATIONS[@]})) -INSTRUCTIONS=$(echo "$(${TRANSFORMATIONS[$RAND_INDEX]})" | cut -d "|" -f 1) -INSTRUCTIONS2=$(echo "$(${TRANSFORMATIONS[$RAND_INDEX]})" | cut -d "|" -f 3) -TEXT=$(echo "$(${TRANSFORMATIONS[$RAND_INDEX]})" | cut -d "|" -f 2) +INSTRUCTIONS0=$(echo "$(${TRANSFORMATIONS[$RAND_INDEX]})") +INSTRUCTIONS1=$(echo $INSTRUCTIONS0 | cut -d "|" -f 1) +INSTRUCTIONS2=$(echo $INSTRUCTIONS0 | cut -d "|" -f 3) +TEXT=$(echo $INSTRUCTIONS0 | cut -d "|" -f 2) convert -size 300x70 xc:none -pointsize 20 \ \( -clone 0 -fill black \ -stroke black -strokewidth 1 \ - -font Helvetica-Narrow -annotate "0x0+0+0" "\n $INSTRUCTIONS" \ + -font Helvetica-Narrow -annotate "0x0+0+0" "\n $INSTRUCTIONS1" \ -font Helvetica-Bold -annotate "0x0+0+22" "\n $TEXT" \ -font Helvetica-Narrow -annotate "0x0+0+44" "\n $INSTRUCTIONS2" \ -roll +$ROLL_X+0 \ @@ -126,7 +127,7 @@ convert -size 300x70 xc:none -pointsize 20 \ convert -size 300x70 xc:none -pointsize 20 \ \( -clone 0 -fill black \ -stroke black -strokewidth 1 \ - -font Helvetica-Narrow -annotate "0x0+0+0" "\n $INSTRUCTIONS" \ + -font Helvetica-Narrow -annotate "0x0+0+0" "\n $INSTRUCTIONS1" \ -font Helvetica-Bold -annotate "0x0+0+22" "\n $TEXT" \ -font Helvetica-Narrow -annotate "0x0+0+44" "\n $INSTRUCTIONS2" \ -roll +$ROLL_X+0 \