Burp Suite User Forum

Create new post

Converting Python List to java.util.List

Hamoon | Last updated: Sep 29, 2019 07:22PM UTC

Using Python, I am trying to get the result of invocation.getSelectedMessages() to be passed into the function sendToIntruder() as the payloadPositionOffsets Parameter. I can't seem to get the right format to put into sendToIntruder() as it is expecting a java.util.List and what I have might be a python LIST. Function: sendToIntruder(java.lang.String host, int port, boolean useHttps, byte[] request, java.util.List<int[]> payloadPositionOffsets) Code: self._messages = invocation.getSelectedMessages() selectionBounds = self._selectionBounds aJavaList = java.util.Arrays.asList(self._selectionBounds) anArray = jarray.array(self._selectionBounds, java.lang.Object) self._callbacks.sendToIntruder(host,port,True,request, aJavaList)

Mike, PortSwigger Agent | Last updated: Oct 01, 2019 10:22AM UTC

Hi Hamoon, @IContextMenuInvocation.getSelectedMessages()@ returns an array of @IHttpRequestReponse@ objects which is taken from the requests that are currently selected by the user when the context menu was invoked, sendToIntruder requires a singular request as a byte array so you don't need a list of requests, you need a list of offsets which are the positions of the payloads, does your request contain payloads?

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