Burp Suite User Forum

Create new post

Variable Persistence

Dan | Last updated: May 09, 2016 09:27PM UTC

Is there a way to persist a variable between requests in an extension? For example I want to take a parameter from one response and then in a later request use this to calculate a different parameter? The value which needs to be sent in the later request is based on the first response, but I need to do some calculations on it first so I can't just save it using a macro and replay it later.

PortSwigger Agent | Last updated: May 10, 2016 08:03AM UTC

You'll need to store the value in your own variable and then access it later. Depending on exactly what you are trying to do, you might just need to hold on to one value (the latest one observed) or you might need to maintain a map if you need to track multiple values in parallel.

Burp User | Last updated: May 11, 2016 01:47PM UTC

Thanks Dafydd, wasn't thinking it through last night, storing it in a global variable achieves what I want thanks.

You must be an existing, logged-in customer to reply to a thread. Please email us for additional support.