The Burp Suite User Forum was discontinued on the 1st November 2024.

Burp Suite User Forum

For support requests, go to the Support Center. To discuss with other Burp users, head to our Discord page.

SUPPORT CENTER DISCORD

Manipulate Header Request Parameter in Extension

Jan | Last updated: Mar 27, 2017 04:09PM UTC

Hi, I want to build up a automatic test system for a json api. My plan is as follows: Initially I get a fresh login token. Then i get into the proxy (processProxyMessage) and to replace the token with my freshly acquired login token. My problem is that I cannot update the content of my request. The token just doesnt change. Pseudocode: public void processProxyMessage(boolean messageIsRequest, IInterceptedProxyMessage message) { IRequestInfo request= helpers.analyzeRequest(message.getMessageInfo()); String user_1_Token=getNewLoginToken(message); List<String> headers= request.getHeaders(); for (String header : headers) { if (header.startsWith("Auth")) { previous_auth_header=header; } } headers.remove(previous_auth_header); headers.add("Authorization: Bearer "+user_1_Token); Maybe the manipulate of the array does not really effect the forwarded request, but I don't know how to do it correcty. Any ideas?

PortSwigger Agent | Last updated: Mar 28, 2017 10:30AM UTC