#About the method of request at the time of pre-condition check

1 messages · Page 1 of 1 (latest)

gusty rain
#

The example shows a setting of "only run if method is POST" in pre-condition, but is there a way to call such a template with POST method?
'nuclei -target 'http://example.com/path' -t . /template.yaml'
I am aware that if I call template in the form "http://example.com/path", the diagnosis is performed based on a GET request to http://example.com/path.
So I don't think there is any method other than GET request when checking pre-condition, is there any other way to call it? I would like to know when such a pre-condition check would be beneficial.

https://docs.projectdiscovery.io/templates/protocols/http/fuzzing-examples#basic-host-header-injection:```
http:
# pre-condition to determine if the template should be executed

  • pre-condition:
    • type: dsl
      dsl:
      • 'method == "POST"' # only run if method is POST
      • 'contains(path,"reset")' # only run if path contains reset word
        condition: and
ProjectDiscovery Documentation

Review some examples of fuzzing with Nuclei

compact acorn
#

Im not clear what you mean there no way to get anything other than a get. Did you look at templates that use post? Or anything else?

gusty rain
#
http:
    # pre-condition to determine if the template should be executed
  - pre-condition:
      - type: dsl
        dsl:
          - 'method == "POST"'       # only run if method is POST
          - 'contains(path,"reset")' # only run if path contains reset word
        condition: and

It's hard to explain any better. So let me ask from a different angle.

What are the commands to call template that would pass the pre-condition of this template and cause fuzzing to be executed?
I am wondering if there is no option in the nuclei options to specify the http method, so there is no case where fuzzing is executed because all templates are called with the get method? I am wondering if this is the case.

quick shard
#

This is for fuzzing for input passed through -im option that can have burp / openapi specs that contains all kind of requests, so these are applicable on those inputs.