Burp Suite User Forum

Create new post

Save and restore state of an extension

Federico | Last updated: Jan 01, 2016 10:54AM UTC

Hi! I'm working on a "Save and Restore state" for a Burp Suite plugin. The state must contain also some IHttpRequestResponsePersisted. My idea was to save host, port, protocol, request bytes and response bytes and then restoring in this way: httpService = buildHttpService(host, port, protocol) IHttpRequestResponse reqRes = makeHttpRequest(httpService, request) reqRes.setResponse(response) The problem is that the method makeHttpRequest execute a new request and I can't find a method to create a IHttpRequestResponse object without issuing a new request (because it is a "restore" functionality and I already have the response). Thank you a lot for the help. Regards, Federico

PortSwigger Agent | Last updated: Jan 03, 2016 10:52AM UTC

Since IHttpRequestResponse is an interface, you can create your own class that implements this interface and holds the restored data. When you have recovered your data, just create an instance of your class to represent it.

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