Browse Source

Better text for captchas

master
Adrien Bourmault 3 months ago
parent
commit
26108b4c6a
Signed by: neox GPG Key ID: 6EB408FE0ACEC664
  1. 6
      captcha/captcha.sh

6
captcha/captcha.sh

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

Loading…
Cancel
Save