Better text for captchas

This commit is contained in:
Adrien Bourmault 2021-08-31 21:57:45 +02:00
parent e71da9bb8e
commit 26108b4c6a
Signed by: neox
GPG Key ID: 6EB408FE0ACEC664

View File

@ -124,19 +124,19 @@ RC=`seq 1 2 | sort -R | head -n 1` # 1 = - | 2 = +
if (( $RC == 1 ));then if (( $RC == 1 ));then
FALSENBR=`seq $TARGET 10 | sort -R | head -n 1` FALSENBR=`seq $TARGET 10 | sort -R | head -n 1`
RESUME=$(( FALSENBR - TARGET )) RESUME=$(( FALSENBR - TARGET ))
INSTRUCTIONS1="Calculez: $FALSENBR moins $RESUME. Copiez..." INSTRUCTIONS1="Calculez: ${DIGIT[FALSENBR]} moins ${DIGIT[RESUME]} et copiez"
NAME="CALCULM-$FALSENBR-$RESUME" NAME="CALCULM-$FALSENBR-$RESUME"
else else
FALSENBR=`seq 1 4 | sort -R | head -n 1` FALSENBR=`seq 1 4 | sort -R | head -n 1`
if (( $FALSENBR <= $TARGET ));then if (( $FALSENBR <= $TARGET ));then
RESULT=$(( TARGET + FALSENBR )) RESULT=$(( TARGET + FALSENBR ))
RESUME=$(( TARGET - FALSENBR )) RESUME=$(( TARGET - FALSENBR ))
INSTRUCTIONS1="Calculez: ${DIGIT[FALSENBR]} + ${DIGIT[RESUME]} et copiez" INSTRUCTIONS1="Calculez: ${DIGIT[FALSENBR]} plus ${DIGIT[RESUME]} et copiez"
NAME="CALCULP-$FALSENBR-$RESUME" NAME="CALCULP-$FALSENBR-$RESUME"
else else
RESULT=$(( FALSENBR - TARGET )) RESULT=$(( FALSENBR - TARGET ))
RESUME=$(( TARGET - RESULT )) RESUME=$(( TARGET - RESULT ))
INSTRUCTIONS1="Calculez: ${DIGIT[RESULT]} + ${DIGIT[RESUME]} et copiez" INSTRUCTIONS1="Calculez: ${DIGIT[RESULT]} plus ${DIGIT[RESUME]} et copiez"
NAME="CALCULP-$RESULT-$RESUME" NAME="CALCULP-$RESULT-$RESUME"
fi fi
fi fi