Burp Suite User Forum

Login to post

How do I replace the content of a whole file?

R. | Last updated: Feb 05, 2015 10:18AM UTC

Hi, a web app I am testing is requesting jar files from a web server. I want to replace the jar file the server sends back with a modified version. I can of course intercept the response and manually replace the response content, but this is error prone and takes time. I have certain timing issues that make manually pasting the jar file not an option. So, how do I replace the whole response body with something else? Thank you very much, R.

PortSwigger Agent | Last updated: Feb 05, 2015 12:24PM UTC

You can use the "Paste from file" option on the context menu to paste binary content from a file.

Burp User | Last updated: Feb 05, 2015 12:52PM UTC

Hello Dafydd, thank you very much for the fast reply. Sadly, there are certain timing constraints which prevent me from manually pasting the file. Is there a built-in way of automating this, or would I need to write an extension for this?

PortSwigger Agent | Last updated: Feb 05, 2015 02:25PM UTC

Ok, if the timing issues mean it's not feasible to do any quick manual operations on an intercepted message, then you'll need to write an extension. You can register an IHttpListener or IProxyListener and modify relevant requests before they are sent.

You need to Log in to post a reply. Or register here, for free.