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

Cookies header (and other headers) does not work when using "follow". #86

Open
Baltazar500 opened this issue Feb 28, 2022 · 4 comments
Open

Comments

@Baltazar500
Copy link

Cookies header (and other headers) does not work when using "follow". For base url only. Checked via BURP (used --proxy key) I changed the position of the header in the expression before and after follow, but it didn't help.

Cookies from the file did not check, and it is difficult to use them

@benibela
Copy link
Owner

benibela commented Mar 5, 2022

Indeed, it does not use the header. --method, --data, and --header

Mostly because, when the follow is a POST request, it might need its own headers that would be calculated in the follow option

You could use --follow ' {"header": "....", "url": "..."} '

Or the cookies from the file

@Baltazar500
Copy link
Author

Baltazar500 commented Apr 5, 2022

You could use --follow ' {"header": "....", "url": "..."} '

@benibela, Thanks, this works, but each new child or parallel request must be provided with a cookie header. Is it possible to use the specified cookie header at the beginning for all parallel or child requests? Maybe a special option?

@benibela
Copy link
Owner

You can save the headers in a variable and reuse them later

--follow ' {"header": $myheaders := "....", "url": "..."} '

then

--follow ' {"header": $myheaders, "url": "..."} '

I could change it to share Cookie headers (but not other headers like Referer). Or I could add an option --global-header="Somehader: " that shares the header to the children. Or an option like --make-all-headers-global.

@Baltazar500
Copy link
Author

@benibela,

You can save the headers in a variable and reuse them later

That's what I did then. Only I had to repeat this 6 times and because of this, the expression became much larger

I could change it to share Cookie headers (but not other headers like Referer). Or I could add an option --global-header="Somehader: " that shares the header to the children. Or an option like --make-all-headers-global.

The parameter --global-header="Somehader: " is what is needed in this case :) But the --make-all-headers-global parameter, I think, would also be useful :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants