Burp Suite User Forum

Login to post

Weird behavior while setting request

shafou | Last updated: Jan 04, 2022 07:23PM UTC

Hi, I made an extension to add a custom header to every request, but it seems that it is breaking a lot of pages. An example is those one click captchas, but i also break a lot os SPAs. I want to get some help on how i could avoid that. I know of some extensions that accomplish the same behavior but most are written on java and i really don't wanna go on some rabbit hole trying to figure it out how they do it. Here is the ext code. I think the problem is the way i change the request on line 22, but i could not find a different way to do it. Any help would be appreciated. https://gist.github.com/shafouz/7f6310aca3daed56c34f92c3b23c6711

Hannah, PortSwigger Agent | Last updated: Jan 05, 2022 09:52AM UTC

Hi Do you have some more details on how adding a header is breaking specific requests? Have you tried using the BApp Store extension, "Add Custom Header"? Alternatively, you can find a basic Python script here: https://github.com/UthmanPortSwigger/add-custom-headers/blob/main/Custom-Headers/Python/Add-Headers-Python.py There is also a slightly more complex extension, written in Java, in that repository that you could take a look at.

shafou | Last updated: Jan 05, 2022 06:00PM UTC

ty for anwser. I was using processProxyMessage instead of processHttpMessage

You need to Log in to post a reply. Or register here, for free.