Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extractors add variable support #2647

Open
capiton0 opened this issue Sep 27, 2022 · 0 comments · May be fixed by #5727
Open

extractors add variable support #2647

capiton0 opened this issue Sep 27, 2022 · 0 comments · May be fixed by #5727
Labels
Type: Enhancement Most issues will probably ask for additions or changes.

Comments

@capiton0
Copy link

Please describe your feature request:

This is the json data returned from the target site:

{
 "subdomain": ["www","m","mail"]
}

This is the extractors syntax I use:

    extractors:
      - type: json
        part: body
        name: subdomain
        json:
          - '.subdomain[]'

The final output:

[test:status-1] [http] [info] https://test.com/subdomains [www,m,mail]

Describe the use case of this feature:

I want to add variables to the output

variables:
 domain: "xxx.com"

     extractors:
      - type: json
        part: body
        name: subdomain
        json:
          - '"\(.subdomain[]).{{domain}}"'

or

nuclei -var domain=xxx.com
     extractors:
      - type: json
        part: body
        name: subdomain
        json:
          - '"\(.subdomain[]).{{domain}}"'

Let the final output look like this:

[test:status-1] [http] [info] https://test.com/subdomains [www.xxx.com,m.xxx.com,mail.xxx.com]
@capiton0 capiton0 added the Type: Enhancement Most issues will probably ask for additions or changes. label Sep 27, 2022
@murat-kekij murat-kekij linked a pull request Oct 13, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant