Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from burp import IBurpExtender,IProxyListener
class BurpExtender(IBurpExtender,IProxyListener):
def registerExtenderCallbacks(self,callbacks):
self._helpers = callbacks.getHelpers()
self._callbacks = callbacks
self._callbacks.setExtensionName("IProxyListener Params")
self._callbacks.registerProxyListener(self)
def processProxyMessage(self,messageIsRequest,message):
if messageIsRequest:
msg = message.getMessageInfo()
req_bytes = msg.getRequest() # RAW Request in Bytes
req = self._helpers.analyzeRequest(req_bytes)
req_params = req.getParameters() ## this would be in list
param_list = []
for param in req_params:
new_param = self._helpers.buildParameter(param.getName(),"XXXXXXXXX",param.getType())
param_list.append(new_param)
new_request = self._helpers.updateParameter(req_bytes,param_list)
msg.setRequest(new_request)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment