Burp Suite User Forum

Create new post

Get all query parameters

sourav | Last updated: May 03, 2023 05:05AM UTC

I am creating an extension in python with IExtender API. I have checked but not able to find any ways to get all parameter. Url.com/login?username=admin& password=admin@123 I need to get all instead of 1 paramter at a time "username=admin& password=admin@123" I found an alternative solution like get full url and split with ? to get all parameters but i also want to perform some action on all parameters and update the same in url. I want to implement the same as get request body and update the request body. but instead of body i want to work with query parameters.

Hannah, PortSwigger Agent | Last updated: May 04, 2023 10:31AM UTC

Hi If you were to use the Montoya API, you can easily do this by using "HttpRequest.parameters()" to retrieve the parameters, and "HttpRequest.withUpdatedParameters()" to update a parameter within a request. In the legacy Extender API, you can use "IExtensionHelpers.analyzeRequest(request).getParameters()". This is a function on the IRequestInfo class. To update a parameter, you could use a "find and replace" function, or use the offsets provided by "IParameterInfo.getValueStart()" and "IParameterInfo.getValueEnd()" to determine where to replace the content.

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