xidel icon indicating copy to clipboard operation
xidel copied to clipboard

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

Open Baltazar500 opened this issue 3 years ago • 4 comments

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

Baltazar500 avatar Feb 28 '22 01:02 Baltazar500

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

benibela avatar Mar 05 '22 21:03 benibela

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?

Baltazar500 avatar Apr 05 '22 02:04 Baltazar500

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.

benibela avatar May 12 '22 21:05 benibela

@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 :)

Baltazar500 avatar May 29 '22 14:05 Baltazar500