Automatically Change Response
I am currently developing a Burp plugin in python and do have a problem for which I don't have a solution. I basically want to automatically change the response but I do have a plugin in between that decodes my binary. What I have achieved until now is that I see my decoded message as a new tab in the proxy and target view. I can also manipulate the response by intercepting it first and then change whatever I want manually (this works through implementing IMessageEditorTab's getMessage).
However, I would want to change that data in my decoded message on the fly without the need to manually operate. It all sums up to Burp's Proxy - Options - Match and Replace functionality BUT on top of my decoded message.
Does anyone have advice on how to do that? I don't seem to find the correct interface / method to achieve that.
It sounds like the IHttpListener interface would be suitable. You can provide a processHttpMessage method which is called each time a request or response is sent to/from Burp.
You may be interested in the FastInfoSet Tester BApp which does something similar:- https://github.com/portswigger/fast-infoset-tester
Please let us know if you need any further assistance.
thanks for your insanely quick answer. I think I managed to do what I wanted to in the beginning. The interface you specified was the one I was searching for. Hope, I can finish my plugin soon. Will come back in case I have another question.