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

include cname in http output if available #5389

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

tarunKoyalwar
Copy link
Member

@tarunKoyalwar tarunKoyalwar commented Jul 8, 2024

Proposed Changes

  • since dns data is cached in fastdialer on first dial , it is now included in http protocol variables when available thereby removing need of doing one more dns request using protocol
$ ./nuclei -u https://support.hackerone.com -t a.yaml 

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v3.3.0-dev

		projectdiscovery.io

[INF] Current nuclei version: v3.3.0-dev (development)
[INF] Current nuclei-templates version: v9.9.0 (latest)
[WRN] Scan results upload to cloud is disabled.
[INF] New templates added in latest release: 164
[INF] Templates loaded for current scan: 1
[WRN] Loading 1 unsigned templates for scan. Use with caution.
[INF] Targets loaded for current scan: 1
[basic-example:cname] [http] [info] https://support.hackerone.com ["2fe254e58a0ea8096400b2fda121ee35.freshdesk.com"]
[basic-example:cname_all] [http] [info] https://support.hackerone.com ["[2fe254e58a0ea8096400b2fda121ee35.freshdesk.com fwfd-use1-lb208.freshdesk.com]"]
id: basic-example

info:
  name: Test HTTP Template
  author: pdteam
  severity: info

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    extractors:
      - type: dsl
        name: cname
        dsl:
          - "cname"

      - type: dsl
        name: cname_all
        dsl:
          - "cname_all"

@tarunKoyalwar tarunKoyalwar self-assigned this Jul 8, 2024
@tarunKoyalwar tarunKoyalwar marked this pull request as ready for review July 8, 2024 18:43
@tarunKoyalwar tarunKoyalwar requested a review from ehsandeep July 8, 2024 18:44
Copy link
Member

@ehsandeep ehsandeep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

match or extract cname in http template.

id: basic-example

info:
  name: Test HTTP Template
  author: pdteam
  severity: info

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    matchers:
      - type: word
        part: cname
        words:
          - freshdesk.com

    extractors:
      - type: dsl
        dsl:
          - cname
$ echo https://support.hackerone.com | ./nuclei -t test.yaml

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v3.3.0-dev

		projectdiscovery.io

[INF] Current nuclei version: v3.3.0-dev (development)
[INF] Current nuclei-templates version: v9.9.0 (latest)
[WRN] Scan results upload to cloud is disabled.
[INF] New templates added in latest release: 164
[INF] Templates loaded for current scan: 1
[WRN] Loading 1 unsigned templates for scan. Use with caution.
[INF] Targets loaded for current scan: 1
[basic-example] [http] [info] https://support.hackerone.com ["2fe254e58a0ea8096400b2fda121ee35.freshdesk.com"]

@ehsandeep ehsandeep merged commit c9a9bd3 into dev Jul 10, 2024
9 of 12 checks passed
@ehsandeep ehsandeep deleted the provide-cname-when-available branch July 10, 2024 15:13
@ehsandeep ehsandeep linked an issue Jul 15, 2024 that may be closed by this pull request
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.

include cname in http output if available
2 participants