Skip to content

conditional redirects with flow #4583

Pinned Answered by tarunKoyalwar
Baikeryoyo asked this question in Q&A
Discussion options

You must be logged in to vote

@Baikeryoyo , from what i could understand i have created a template . i want to point out that to extract url from 1st request and use it in second request you need to use extractor and not matcher

id: flow-redirect-extract
info:
  name: Flow redirect extract
  author: pdteam
  severity: medium

flow: |
  http(1)
  set("newpath",template.path1[0]) # temporary workaround for (https://github.com/projectdiscovery/nuclei/issues/4547)
  http(2)

http:
  - raw:
      - |
        GET / HTTP/1.1
        Host: {{Hostname}}
        Referer: {{BaseURL}}
    
    host-redirects: true
    max-redirects: 3

    extractors:
      - type: regex
        internal: true
        name: path1
        group: 1

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Baikeryoyo
Comment options

@tarunKoyalwar
Comment options

Answer selected by tarunKoyalwar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
documentation Improvements or additions to documentation Example-Template Useful Example Templates
2 participants
Converted from issue

This discussion was converted from issue #4573 on January 05, 2024 20:48.