-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Helper function for IP Formats #3286
Merged
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
xm1k3
added
the
Type: Enhancement
Most issues will probably ask for additions or changes.
label
Feb 7, 2023
tarunKoyalwar
requested changes
Feb 10, 2023
Example template id: ip-format-example
info:
name: ip format example template
author: pdtm
severity: info
variables:
format: "1"
requests:
- raw:
- |+
GET / HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- "print_debug(ip_format(ipvar,format))"% |
$ ./nuclei -t ~/test/ipformat.yaml -V "ipvar=127.0.0.1" -V "format=5" -u scanme.sh -v
__ _
____ __ _______/ /__ (_)
/ __ \/ / / / ___/ / _ \/ /
/ / / / /_/ / /__/ / __/ /
/_/ /_/\__,_/\___/_/\___/_/ v2.8.8
projectdiscovery.io
[INF] Using Nuclei Engine 2.8.8 (latest)
[INF] Using Nuclei Templates 9.3.6 (latest)
[INF] Templates added in last update: 30
[INF] Templates loaded for scan: 1
[INF] Targets loaded for scan: 1
[INF] Running httpx on input host
[INF] Found 1 URL from httpx
[VER] [ip-format-example] Sent HTTP request to https://scanme.sh/
[INF] print_debug value: [281472812449793]
[ip-format-example] [http] [info] https://scanme.sh/
|
tarunKoyalwar
approved these changes
Feb 10, 2023
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.
lgtm!
$ ./nuclei -t ~/test/ipformat.yaml -V "ipvar=127.0.1.0" -V "format=11" -u scanme.sh -v
__ _
____ __ _______/ /__ (_)
/ __ \/ / / / ___/ / _ \/ /
/ / / / /_/ / /__/ / __/ /
/_/ /_/\__,_/\___/_/\___/_/ v2.8.8
projectdiscovery.io
[INF] Using Nuclei Engine 2.8.8 (outdated)
[INF] Using Nuclei Templates 9.3.6 (latest)
[INF] Templates added in last update: 30
[INF] Templates loaded for scan: 1
[INF] Targets loaded for scan: 1
[INF] Running httpx on input host
[INF] Found 1 URL from httpx
[VER] [ip-format-example] Sent HTTP request to https://scanme.sh/
[INF] print_debug value: [127.0.256]
[ip-format-example] [http] [info] https://scanme.sh/
Mzack9999
requested changes
Feb 10, 2023
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.
lgtm - I suggest anyway to add ip_format
to the integration test /nuclei/integration_tests/http/dsl-functions.yaml
Mzack9999
approved these changes
Feb 14, 2023
ehsandeep
approved these changes
Feb 16, 2023
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.
Proposed changes
Checklist
docs ref: Issue 2271 nuclei ip_format()helper function docs nuclei-docs#119