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

duplicated params in self contained requests #3608

Merged
merged 4 commits into from
Apr 26, 2023

Conversation

tarunKoyalwar
Copy link
Member

@tarunKoyalwar tarunKoyalwar commented Apr 25, 2023

Proposed changes

Checklist

  • Pull request is created against the dev branch
  • All checks passed (lint, unit/integration/regression tests etc.) with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@tarunKoyalwar
Copy link
Member Author

New Integration Tests

  • test for saving extracted values to file
    id: save-extractor-values-to-file
    info:
    name: save extractor values to file
    author: pdteam
    severity: info
    requests:
    - method: GET
    path:
    - "{{BaseURL}}"
    extractors:
    - type: regex
    part: body
    regex:
    - '[0-9]+'
    to: output.txt
  • test for bug fix duplicated params in raw requests

id: self-contained-with-params
info:
name: self contained with params
author: pd-team
severity: info
self-contained: true
requests:
- raw:
- |
GET http://127.0.0.1:5431/?something=here&key=value HTTP/1.1
Host: {{Hostname}}
matchers:
- type: word
words:
- This is self-contained response

@tarunKoyalwar
Copy link
Member Author

POC

  • percentage overflow
$ go run . -stats

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v2.9.3-dev

		projectdiscovery.io

[INF] Current nuclei version: v2.9.3-dev (development)
[INF] Current nuclei-templates version: v9.4.3 (latest)
[INF] New templates added in latest release: 55
[INF] Templates loaded for current scan: 5901
[0:00:05] | Templates: 5901 | Hosts: 0 | RPS: 5 | Matched: 0 | Errors: 25 | Requests: 25/25 (100%)
[INF] No results found. Better luck next time!
$ TESTS="http/self-contained-with-params.yaml,http/save-extractor-values-to-file.yaml" ./run.sh
::group::Build nuclei
::endgroup::
::group::Build nuclei integration-test
::endgroup::
::group::Installing nuclei templates

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v2.9.3-dev

		projectdiscovery.io


::endgroup::
[✓] Test "http/save-extractor-values-to-file.yaml" passed!
[✓] Test "http/self-contained-with-params.yaml" passed!

@ehsandeep ehsandeep merged commit 4e6ef44 into dev Apr 26, 2023
9 of 11 checks passed
@ehsandeep ehsandeep deleted the duplicated-param-self-contained branch April 26, 2023 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants