Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
projectdiscovery
GitHub Repository: projectdiscovery/nuclei
Path: blob/dev/integration_tests/flow/iterate-one-value-flow.yaml
2070 views
1
id: flow-iterate-one-value-flow
2
3
info:
4
name: Test Flow Iterate One Value Flow
5
author: pdteam
6
severity: info
7
description: |
8
If length of template.extracted variable is not know, i.e it could be an array of 1 or more values, then iterate function
9
should be used to iterate over values because nuclei by default converts array to string if it has only 1 value.
10
11
flow: |
12
http(1)
13
for(let value of iterate(template.extracted)){
14
set("value", value)
15
http(2)
16
}
17
18
http:
19
- method: GET
20
path:
21
- "{{BaseURL}}"
22
23
extractors:
24
- type: regex
25
name: extracted
26
internal: true
27
regex:
28
- "[ok]+"
29
30
- method: GET
31
path:
32
- "{{BaseURL}}/{{value}}"
33
34
matchers:
35
- type: word
36
words:
37
- "ok"
38