-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Reusing dynamically extracted values as iterators in http request #1288
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR adds the support in http module to iterate over the dynamically extracted data from extractors and use it in other requests. This allows nuclei to follow links on pages, do operations with multiple versions of the same extracted value, etc.
1 task
Example Template id: valid-robotstxt-endpoints
info:
name: Iterate robots.txt and request endpoints
author: pdteam
severity: info
requests:
- raw:
- |
GET /robots.txt HTTP/1.1
Host: {{Hostname}}
- |
GET {{endpoint}} HTTP/1.1
Host: {{Hostname}}
iterate-all: true
extractors:
- part: body
name: endpoint
internal: true
type: regex
regex:
- "(?m)/([a-zA-Z0-9-_/\\\\]+)"
matchers:
- type: status
status:
- 200
To test -
./nuclei -t test.yaml -u https://github.com
__ _
____ __ _______/ /__ (_)
/ __ \/ / / / ___/ / _ \/ /
/ / / / /_/ / /__/ / __/ /
/_/ /_/\__,_/\___/_/\___/_/ 2.5.4-dev
projectdiscovery.io
[WRN] Use with caution. You are responsible for your actions.
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[INF] Using Nuclei Engine 2.5.4-dev (development)
[INF] Using Nuclei Templates 8.6.8 (latest)
[INF] Using Interactsh Server https://interactsh.com
[INF] Templates added in last update: 0
[INF] Templates loaded for scan: 1
[valid-robotstxt-endpoints] [http] [info] https://github.com/robots.txt
[valid-robotstxt-endpoints] [http] [info] https://github.com/search/advanced
[valid-robotstxt-endpoints] [http] [info] https://github.com/account-login
[valid-robotstxt-endpoints] [http] [info] https://github.com/stargazers
[valid-robotstxt-endpoints] [http] [info] https://github.com/archive/
[valid-robotstxt-endpoints] [http] [info] https://github.com/tarball/
[valid-robotstxt-endpoints] [http] [info] https://github.com/contributors
[valid-robotstxt-endpoints] [http] [info] https://github.com/pulse
[valid-robotstxt-endpoints] [http] [info] https://github.com/tags
[valid-robotstxt-endpoints] [http] [info] https://github.com/zipball/
[valid-robotstxt-endpoints] [http] [info] https://github.com/Explodingstuff/
[valid-robotstxt-endpoints] [http] [info] https://github.com/forks
[valid-robotstxt-endpoints] [http] [info] https://github.com/search
[valid-robotstxt-endpoints] [http] [info] https://github.com/watchers
[valid-robotstxt-endpoints] [http] [info] https://github.com/ekansa/Open-Context-Data
[valid-robotstxt-endpoints] [http] [info] https://github.com//docs
[valid-robotstxt-endpoints] [http] [info] https://github.com/download
[valid-robotstxt-endpoints] [http] [info] https://github.com/revisions |
Mzack9999
requested changes
Nov 29, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good:
Interactsh
test failure can be ignored- Marking as request changes due to conflicts
Mzack9999
approved these changes
Dec 2, 2021
ehsandeep
approved these changes
Dec 2, 2021
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the support in http module to iterate over the dynamically extracted data from extractors
and use it in other requests. This allows nuclei to follow links on pages, do operations with
multiple versions of the same extracted value, etc.
Proposed changes
Checklist