From 1ab3fbb093d843fe7c6548acda3a29588594ff70 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Fri, 8 Jan 2021 22:20:07 +0100 Subject: [PATCH] Captcha : corrected a typo --- captcha/captcha.sh | 8 ++++---- captcha/experimental.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/captcha/captcha.sh b/captcha/captcha.sh index 3efe84c..1c1db55 100755 --- a/captcha/captcha.sh +++ b/captcha/captcha.sh @@ -99,7 +99,7 @@ SOMME() A=$(($INPUT - $RA)) B=$RA else - B=$(($INPUT + $RA)) + B=$(($INPUT - $RA)) A=$RA fi @@ -127,16 +127,16 @@ RAND_INDEX=$(($R % ${#TRANSFORMATIONS[@]})) convert -size 300x60 xc:none -pointsize 20 \ \( -clone 0 -fill black \ -stroke black -strokewidth 1 \ - -annotate "${RAND_ANGLE}x${RAND_ITALIC}+0+0" "\n $(${TRANSFORMATIONS[1]})" \ + -annotate "${RAND_ANGLE}x${RAND_ITALIC}+0+0" "\n $(${TRANSFORMATIONS[$RAND_INDEX]})" \ -roll +$ROLL_X+0 \ -wave "$WAVE1_AMPLITUDE"x"$WAVE1_LENGTH" \ -roll -$ROLL_X+0 \) \ - -flatten -crop 300x60 +repage -quality 500 -depth 11 png:"/var/tmp/captcha/$(date "+%Y-%m-%d-%H%M").png" + -flatten -crop 300x60 +repage -quality 500 -depth 11 png:"/var/tmp/captcha/${INPUT}_$(date "+%Y-%m-%d-%H%M%S").png" convert -size 300x60 xc:none -pointsize 20 \ \( -clone 0 -fill black \ -stroke black -strokewidth 1 \ - -annotate "${RAND_ANGLE}x${RAND_ITALIC}+0+0" "\n $(${TRANSFORMATIONS[1]})" \ + -annotate "${RAND_ANGLE}x${RAND_ITALIC}+0+0" "\n $(${TRANSFORMATIONS[$RAND_INDEX]})" \ -roll +$ROLL_X+0 \ -wave "$WAVE1_AMPLITUDE"x"$WAVE1_LENGTH" \ -roll -$ROLL_X+0 \) \ diff --git a/captcha/experimental.sh b/captcha/experimental.sh index 3efe84c..fb3e4d6 100755 --- a/captcha/experimental.sh +++ b/captcha/experimental.sh @@ -99,7 +99,7 @@ SOMME() A=$(($INPUT - $RA)) B=$RA else - B=$(($INPUT + $RA)) + B=$(($INPUT - $RA)) A=$RA fi @@ -127,16 +127,16 @@ RAND_INDEX=$(($R % ${#TRANSFORMATIONS[@]})) convert -size 300x60 xc:none -pointsize 20 \ \( -clone 0 -fill black \ -stroke black -strokewidth 1 \ - -annotate "${RAND_ANGLE}x${RAND_ITALIC}+0+0" "\n $(${TRANSFORMATIONS[1]})" \ + -annotate "${RAND_ANGLE}x${RAND_ITALIC}+0+0" "\n $(${TRANSFORMATIONS[$RAND_INDEX]})" \ -roll +$ROLL_X+0 \ -wave "$WAVE1_AMPLITUDE"x"$WAVE1_LENGTH" \ -roll -$ROLL_X+0 \) \ - -flatten -crop 300x60 +repage -quality 500 -depth 11 png:"/var/tmp/captcha/$(date "+%Y-%m-%d-%H%M").png" + -flatten -crop 300x60 +repage -quality 500 -depth 11 png:"/var/tmp/captcha/EXPERIMENTAL${INPUT}_$(date "+%Y-%m-%d-%H%M%S").png" convert -size 300x60 xc:none -pointsize 20 \ \( -clone 0 -fill black \ -stroke black -strokewidth 1 \ - -annotate "${RAND_ANGLE}x${RAND_ITALIC}+0+0" "\n $(${TRANSFORMATIONS[1]})" \ + -annotate "${RAND_ANGLE}x${RAND_ITALIC}+0+0" "\n $(${TRANSFORMATIONS[$RAND_INDEX]})" \ -roll +$ROLL_X+0 \ -wave "$WAVE1_AMPLITUDE"x"$WAVE1_LENGTH" \ -roll -$ROLL_X+0 \) \