How to do math operations in templates #7922
Answered
by
princechaddha
clancyb00m
asked this question in
Q&A
-
I need to subtract 1 from the hexadecimal value generated by the hex_encode function and then use the hex_decode function
so how can i implement it
|
Beta Was this translation helpful? Give feedback.
Answered by
princechaddha
Aug 22, 2023
Replies: 1 comment
-
Hi @clancyb00m, The response time for this discussion was much longer than usual. You can perform math operations as shown in the following example: id: math-operations
info:
name: Math operations
author: princechaddha
severity: info
variables:
string: "aaaaa"
hex: "{{hex_encode(string)}}"
substract: "{{to_number(hex)-1}}"
http:
- method: GET
path:
- "{{BaseURL}}"
matchers:
- type: status
status:
- 200
extractors:
- type: dsl
dsl:
- string
- hex
- substract
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
princechaddha
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @clancyb00m, The response time for this discussion was much longer than usual. You can perform math operations as shown in the following example: