Skip to content

Conversation

Mzack9999
Copy link
Member

Proposed changes

Fixes h2 support - Closes #3976

$ cat t.yaml
id: test

info:
  name: test
  author: test
  severity: info
  tags: test

http:
  - raw:
      - |
        GET / HTTP/2
        Host: {{Hostname}}

$ nuclei -t t.yaml -fh2 -v -u https://scanme.sh -duc -debug

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v2.9.15

                projectdiscovery.io

[INF] Current nuclei version: v2.9.15 (outdated)
[INF] Current nuclei-templates version: v9.6.5 (latest)
[INF] New templates added in latest release: 75
[INF] Templates loaded for current scan: 1
[INF] Targets loaded for current scan: 1
[INF] [test] Dumped HTTP request for https://scanme.sh/

GET / HTTP/1.1
Host: scanme.sh
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.3319.102 Safari/537.36
Connection: close
Accept-Encoding: gzip

[DBG] [test] Dumped HTTP response https://scanme.sh/

HTTP/2.0 200 OK
Content-Length: 2
Content-Type: text/plain; charset=utf-8
Date: Fri, 13 Oct 2023 11:30:37 GMT

ok
[INF] No results found. Better luck next time!

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)

@Mzack9999 Mzack9999 self-assigned this Oct 13, 2023
@Mzack9999 Mzack9999 added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Oct 13, 2023
@Mzack9999 Mzack9999 linked an issue Oct 13, 2023 that may be closed by this pull request
@Mzack9999 Mzack9999 marked this pull request as ready for review October 13, 2023 11:46
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.

id: test

info:
  name: test
  author: test
  severity: info
  tags: test

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

    matchers:
      - type: word
        part: header
        words:
          - "HTTP/2.0"
./nuclei -t test.yaml -v -u https://scanme.sh -debug -v -fh2

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v2.9.15

		projectdiscovery.io

[INF] Current nuclei version: v2.9.15 (latest)
[INF] Current nuclei-templates version: v9.6.5 (latest)
[INF] New templates added in latest release: 75
[INF] Templates loaded for current scan: 1
[INF] Targets loaded for current scan: 1
[INF] [test] Dumped HTTP request for https://scanme.sh

GET / HTTP/1.1
Host: scanme.sh
User-Agent: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36
Connection: close
Accept: */*
Accept-Language: en
Accept-Encoding: gzip

[DBG] [test] Dumped HTTP response https://scanme.sh

HTTP/2.0 200 OK
Content-Length: 2
Content-Type: text/plain; charset=utf-8
Date: Fri, 13 Oct 2023 16:11:24 GMT

ok
[test:word-1] [http] [info] https://scanme.sh

@ehsandeep ehsandeep merged commit 62cd4dd into dev Oct 13, 2023
@ehsandeep ehsandeep deleted the bugfix-3976-h2 branch October 13, 2023 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Force HTTP 2 Doesn't work
2 participants