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

how to set header as dynamic parameter #10730

Open
k3mlol opened this issue Sep 11, 2024 · 0 comments
Open

how to set header as dynamic parameter #10730

k3mlol opened this issue Sep 11, 2024 · 0 comments
Assignees
Labels
Type: Enhancement Most issues will probably ask for additions or changes.

Comments

@k3mlol
Copy link

k3mlol commented Sep 11, 2024

Hi, I want to set the header as dynamic parameter, how to write this template?

id: scan-header-cus

info:
  name: detect custom header 
  author: k3mlol
  severity: low
  description: detect custom header
  metadata:
    verified: true
  tags: headers

flow: |
  http(1);
  for (let c_header of iterate(template["custom_headers"])) {
    set("c_header", c_header);
    http(2);
  }
http:
  - method: OPTIONS
    path:
      - '{{BaseURL}}'

    headers:
      Origin: '{{BaseURL}}'

    extractors:
      - type: kval
        name: custom_headers
        kval:
          - allow_headers
        internal: true
        group: 1
      
  - method: GET
    path:
      - "{{BaseURL}}"
    
    headers:
      {{c_header}}: ssss
    
    matchers-condition: and
    matchers:
    - type: status
      status:
      - 200
@k3mlol k3mlol added the Type: Enhancement Most issues will probably ask for additions or changes. label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

No branches or pull requests

2 participants