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

Proposing new type (kval) support for extractors #151

Closed
ehsandeep opened this issue Jul 13, 2020 · 1 comment · Fixed by #158
Closed

Proposing new type (kval) support for extractors #151

ehsandeep opened this issue Jul 13, 2020 · 1 comment · Fixed by #158
Assignees
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed.

Comments

@ehsandeep
Copy link
Member

ehsandeep commented Jul 13, 2020

As of now, only regex type extractors are supported, as discussed previously we can start with adding new type of support which allows to pull key:value formatted data from response header and cookie and later extend this type or add another one to pull data from response body based on tags/elements/id, etc.

Here is an example template that will extract value from the response header for the given header key.

id: extractors-example

info:
  name: Extractors Test
  author: pdteam
  severity: info

requests:
  - method: GET
    path:
      - "{{BaseURL}}/"
      
    extractors:
      - type: kval
        name: server
        kval:
          - "server"
> echo https://www.hackerone.com | nuclei -t extractors-example.yaml -silent 

[extractors-example] [http] http://example.com [cloudflare]

Where raw response looks like this, this applies to cookies as well, they are also stored in key:value format.

age: 119
via: varnish
x-cache: HIT
x-cache-hits: 9
cf-cache-status: DYNAMIC
cf-request-id: 03e880ebba0000e291c1a68200000001
server: cloudflare
cf-ray: 5b210425ffcde291-NAG
@ehsandeep ehsandeep added Priority: Low This issue can probably be picked up by anyone looking to contribute to the project, as an entry fix Type: Discussion Some ideas need to be planned and disucssed to come to a strategy. Type: Enhancement Most issues will probably ask for additions or changes. labels Jul 13, 2020
@ehsandeep
Copy link
Member Author

This type kval will support two types of input and limited to headers for now, as it primarily aims to get data from headers and cookies, examples are as follows.

key:value
key=value

@Mzack9999 Mzack9999 added Status: In Progress This issue is being worked on, and has someone assigned. and removed Type: Discussion Some ideas need to be planned and disucssed to come to a strategy. labels Jul 14, 2020
@Mzack9999 Mzack9999 linked a pull request Jul 16, 2020 that will close this issue
@ehsandeep ehsandeep added Status: Completed Nothing further to be done with this issue. Awaiting to be closed. and removed Priority: Low This issue can probably be picked up by anyone looking to contribute to the project, as an entry fix Status: In Progress This issue is being worked on, and has someone assigned. Type: Enhancement Most issues will probably ask for additions or changes. labels Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants