Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Converting Python List to java.util.List

MH 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.

sendToIntruder(java.lang.String host, int port, boolean useHttps, byte[] request, java.util.List<int[]> payloadPositionOffsets)


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 Eaton Oct 01, 2019 10:47AM UTC Support Center agent

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?

Post Your public answer

Your name
Your email address