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

Add '-Vf' parameter, allows specifying the file for multiple variables (#2347) #4007

Closed
wants to merge 4 commits into from

Conversation

lu4nx
Copy link
Contributor

@lu4nx lu4nx commented Jul 30, 2023

Add '-Vf' parameter, allows specifying the file for multiple variables #2347

  • Example:

stackoverflow.yaml:

id: stackoverflow

info:
  name: StackOverflow User Name Information - Detect
  author: lu4nx
  severity: info

self-contained: true
http:
  - method: GET
    path:
      - "https://stackoverflow.com/{{var1}}/filter?search={{user}}"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "{{match-text}}"
        negative: true

      - type: status
        status:
          - 200

vars.txt:

user=lu4nx
var1=users
match-text=<p>No users matched your search.</p>
$ ./nuclei -t /tmp/stackoverflow.yaml -duc -Vf /tmp/vars.txt                  

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v2.9.10

		projectdiscovery.io

[INF] Current nuclei version: v2.9.10 (outdated)
[INF] Current nuclei-templates version: v9.5.8 (outdated)
[INF] New templates added in latest release: 113
[INF] Templates loaded for current scan: 1
[stackoverflow] [http] [info] https://stackoverflow.com/users/filter?search=lu4nx

@ehsandeep ehsandeep changed the base branch from main to dev July 30, 2023 06:57
@tarunKoyalwar tarunKoyalwar deleted the branch projectdiscovery:dev August 4, 2023 14:51
@tarunKoyalwar tarunKoyalwar reopened this Aug 4, 2023
@ehsandeep
Copy link
Member

@lu4nx this is already supported and possible:

nuclei -t test.yaml -config var.yaml

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v2.9.15

		projectdiscovery.io

[INF] Current nuclei version: v2.9.15 (latest)
[INF] Current nuclei-templates version: v9.6.3 (latest)
[INF] New templates added in latest release: 54
[INF] Templates loaded for current scan: 1
[stackoverflow] [http] [info] https://stackoverflow.com/variable1/filter?search=test
$ cat var.yaml
var:
  - user=test
  - var1=variable1
  - match-text=test_match

@ehsandeep ehsandeep closed this Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants