Burp community forum

getComment() not returning comment

fenceposterror | Last updated: Nov 04, 2015 11:39AM UTC

Hey, I've wanted to read the comment of a request/response object. I'm using Jython and Java8. It's an implementation of a passive scanner, and the way I wanted to access: self._requestResponse.getComment() If I print the result it is always a None value, despite having set a comment on that particular RR. Tried it with putting the comment on the RR in the Proxy tab as well as the Target tab. What am I missing?

PortSwigger Agent | Last updated: Nov 05, 2015 09:09AM UTC

Annotations of HTTP request/responses are specific to the data held within individual tools. So the Proxy history has a comment field for each of its items, as does the site map, but these are independent. Items being scanned within the Scanner don't support annotations (there isn't anywhere they are shown in the UI), and so the getComment() method will always return null.

Burp User | Last updated: Nov 10, 2015 07:36AM UTC

If I would use a "Send To MyExtension" function - woud that include the comment? If not, how can I transfer the comment to an extension?

Burp User | Last updated: Nov 11, 2015 07:27AM UTC

Alright - solved with the IContextMenuFactory and getSelectedMessages. This way the comment stays alive. Thanks.

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