Captcha : sentences were randomly mixed up, now resolved

This commit is contained in:
root 2021-03-15 12:46:29 +01:00
parent 3b500d7d31
commit caebe44628
1 changed files with 6 additions and 5 deletions

View File

@ -108,14 +108,15 @@ SOMME()
get_random get_random
RAND_INDEX=$(($R % ${#TRANSFORMATIONS[@]})) RAND_INDEX=$(($R % ${#TRANSFORMATIONS[@]}))
INSTRUCTIONS=$(echo "$(${TRANSFORMATIONS[$RAND_INDEX]})" | cut -d "|" -f 1) INSTRUCTIONS0=$(echo "$(${TRANSFORMATIONS[$RAND_INDEX]})")
INSTRUCTIONS2=$(echo "$(${TRANSFORMATIONS[$RAND_INDEX]})" | cut -d "|" -f 3) INSTRUCTIONS1=$(echo $INSTRUCTIONS0 | cut -d "|" -f 1)
TEXT=$(echo "$(${TRANSFORMATIONS[$RAND_INDEX]})" | cut -d "|" -f 2) INSTRUCTIONS2=$(echo $INSTRUCTIONS0 | cut -d "|" -f 3)
TEXT=$(echo $INSTRUCTIONS0 | cut -d "|" -f 2)
convert -size 300x70 xc:none -pointsize 20 \ convert -size 300x70 xc:none -pointsize 20 \
\( -clone 0 -fill black \ \( -clone 0 -fill black \
-stroke black -strokewidth 1 \ -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-Bold -annotate "0x0+0+22" "\n $TEXT" \
-font Helvetica-Narrow -annotate "0x0+0+44" "\n $INSTRUCTIONS2" \ -font Helvetica-Narrow -annotate "0x0+0+44" "\n $INSTRUCTIONS2" \
-roll +$ROLL_X+0 \ -roll +$ROLL_X+0 \
@ -126,7 +127,7 @@ convert -size 300x70 xc:none -pointsize 20 \
convert -size 300x70 xc:none -pointsize 20 \ convert -size 300x70 xc:none -pointsize 20 \
\( -clone 0 -fill black \ \( -clone 0 -fill black \
-stroke black -strokewidth 1 \ -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-Bold -annotate "0x0+0+22" "\n $TEXT" \
-font Helvetica-Narrow -annotate "0x0+0+44" "\n $INSTRUCTIONS2" \ -font Helvetica-Narrow -annotate "0x0+0+44" "\n $INSTRUCTIONS2" \
-roll +$ROLL_X+0 \ -roll +$ROLL_X+0 \