ltm rule command BOTDEFENSE captcha age
iRule(1) BIG-IP TMSH Manual iRule(1)
BOTDEFENSE::captcha_age
Returns the age of the CAPTCHA challenge in seconds.
SYNOPSIS
BOTDEFENSE::captcha_age
DESCRIPTION
Returns the age of the CAPTCHA challenge in seconds. This is only
relevant if the value of BOTDEFENSE::captcha_status is "correct";
otherwise, -1 is returned.
Syntax
BOTDEFENSE::captcha_age
RETURN VALUE
Returns the age of the CAPTCHA challenge in seconds, or -1 if not
applicable.
VALID DURING
BOTDEFENSE_ACTION
EXAMPLES
# EXAMPLE: Send CAPTCHA challenge and validate the response, but to avoid
# blocking requests to which CAPTCHA challenge cannot be sent (non-HTML pages),
# send the CAPTCHA challenge on HTML pages after 30 seconds of aging, which is
# before the expiration of the answer.
when BOTDEFENSE_ACTION {
if {[BOTDEFENSE::action] eq "allow"} {
if {[BOTDEFENSE::captcha_status] eq "correct"} {
if { ([BOTDEFENSE::cs_allowed]) &&
([BOTDEFENSE::captcha_age] >= 30)} {
BOTDEFENSE::action captcha_challenge
}
} else {
if {[BOTDEFENSE::action captcha_challenge] ne "ok"} {
if {[BOTDEFENSE::action custom_response {
login failed because you may not be human
}] ne "ok"} {
BOTDEFENSE::action tcp_rst
}
}
}
}
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-12.1 --First introduced the command.
BIG-IP 2017-01-31 iRule(1)