Burp Suite User Forum

Create new post

How to retrieve only body of response

Reconnect | Last updated: Oct 24, 2017 11:35AM UTC

Hello team I am making http requests to a site and how to get only body of the response. here is the code :- req = self._helpers.buildHttpMessage(headers, body) print self._helpers.bytesToString(req) resp = self.callbacks.makeHttpRequest("127.0.0.1", 1330, True, req) print self._helpers.bytesToString(resp) I have tried to get body by resp.getResponse() but it didnt work,

PortSwigger Agent | Last updated: Oct 24, 2017 12:36PM UTC

Hi Reconnect, First use IExtensionHelpers.analyseResponse to get and IResponseInfo object. This has a getBodyOffset() method, and you can use that with Python string splicing. Please let us know if you need any further assistance.

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