ltm rule command ASM payload
iRule(1) BIG-IP TMSH Manual iRule(1)
ASM::payload
Retrieves or replaces the payload collected by ASM.
SYNOPSIS
ASM::payload (LENGTH | (OFFSET LENGTH))?
ASM::payload length
ASM::payload replace OFFSET LENGTH ASM_PAYLOAD
DESCRIPTION
This command retrieves or replaces the payload collected by ASM.
Syntax
ASM::payload [[] ]
* The command will retrieve up to length bytes of payload starting at
offset. If offset is not specified, a value of offset 0 will be
used. If neither length nor offset are specified, then all of the
payload will be returned.
ASM::payload length
* The command will return the length of the payload that is currently
collected
ASM::payload replace
* The command will replace bytes of payload starting at
with whatever is specified in string. To get insert
behavior leave the argument at zero. To get the same
behavior as delete use an empty string.
RETURN VALUE
VALID DURING
ASM_REQUEST_BLOCKING, ASM_REQUEST_VIOLATION, ASM_RESPONSE_VIOLATION
EXAMPLES
This example replaces the request payload with another string in case a
specific violation is detected.
when ASM_REQUEST_VIOLATION
{
set x [ASM::violation_data]
if {([lindex $x 0] contains "VIOLATION_EVASION_DETECTED")}
{
ASM::payload replace 0 0 "1234567890"
}
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-10.1.0 --First introduced the command.
BIG-IP 2017-01-31 iRule(1)