ITADN

[BUG] Can't use expressions/variables in DNS resolver config

#7374Closedkor-condignum 创建于 2026-05-04
Type: Bug
K
kor-condignumcommented
### Is there an existing issue for this? - [x] I have searched the existing issues. ### Current Behavior I am trying to use an expression/variable in the resolvers config in a custom template: ```yaml 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`): ```yaml 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 ```shell ``` ### Environment ```markdown - OS: Ubuntu 22.04.5 LTS - Nuclei: v3.8.0 ``` ### Anything else? _No response_
关闭于 2026-05-06 0 条评论