Skip to content

Regarding redirection issues #4573

Description

@Baikeryoyo

Regarding redirection issues
Example:
Target: xxx.com
Redirect: xxx.com/zxc.php
I hope to initiate a POST request to xxx.com/zxc.php in the template
Moreover, the path and file of zxc.php are not fixed. I hope to obtain them dynamically using redirection.
After studying the documentation I didn't find a solution to this problem
So I plan to obtain it through regular matching

flow: http(1) && http(2)

http:
  - raw:
      - |
        GET / HTTP/1.1
        Host: {{Hostname}}
        Referer: {{BaseURL}}
    
    host-redirects: true
    max-redirects: 3
    
    matchers:
      - type: regex
        name: path1
        part: body
        regex: 
          - '<meta http-equiv="refresh" content="0;url=/(.+?)"/>'
        
  - raw:
    - |
        POST /{{path1}} HTTP/1.1
        Host: {{Hostname}}
        Referer: {{BaseURL}}
        Content-Type: application/x-www-form-urlencoded

        xxx
        
    matchers: 
      - type: word
        part: body
        words: 
          -  'xxx'

I don't know what went wrong. The template did not successfully make network requests.
I'd like to know the correct way to do this, or some other way to handle redirects

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions