Is there an existing issue for this?
Current Behavior
I am trying to use an expression/variable in the resolvers config in a custom template:
variables:
test_resolver: "1.1.1.1"
dns:
- name: "{{FQDN}}"
type: A
resolvers:
- "{{test_resolver}}"
When trying to run this template it fails:
[WRN] Could not parse template /home/user/nuclei-templates/dns/dns-test.yaml: could not compile request: could not get dns client: could not resolve resolvers expressions: failed to evaluate expression "test_resolver": No parameter 'test_resolver' found.
Expected Behavior
I am expecting expressions/variables to be correctly evaluated. My end goal is to use a previously extracted variable as the resolver for a subsequent DNS query.
Steps To Reproduce
Run nuclei with the following template (./nuclei -target google.com -t nuclei-templates/dns/dns-test.yaml -v):
id: dns-test
info:
name: Test
author: Test
description: Test
severity: info
variables:
test_resolver: "1.1.1.1"
dns:
- name: "{{FQDN}}"
type: A
resolvers:
- "{{test_resolver}}"
matchers:
- type: regex
part: answer
regex:
- "IN\tA\t(.+)$"
Relevant log output
Environment
- OS: Ubuntu 22.04.5 LTS
- Nuclei: v3.8.0
Anything else?
No response
Is there an existing issue for this?
Current Behavior
I am trying to use an expression/variable in the resolvers config in a custom template:
When trying to run this template it fails:
Expected Behavior
I am expecting expressions/variables to be correctly evaluated. My end goal is to use a previously extracted variable as the resolver for a subsequent DNS query.
Steps To Reproduce
Run nuclei with the following template (
./nuclei -target google.com -t nuclei-templates/dns/dns-test.yaml -v):Relevant log output
Environment
Anything else?
No response