Burp Suite User Forum

Login to post

IMessageEditorController including applyMarkers?

michael | Last updated: Feb 22, 2021 10:02AM UTC

I am using Sample Burp Suite extension: custom logger as a base to create a plugin, but I noticed that I cannot add the marker functionality (which is used by scanner issues). IHttpRequestResponseWithMarkers messageInfoMarked; requestMarkers.add(new int[] {1,20}); responseMarkers.add(new int[] {1,20}); messageInfoMarked = callbacks.applyMarkers(baseRequestResponse, requestMarkers, responseMarkers); The docs say that getRequest() returns byte[]. How can I include some marked areas withint the request and reponse that is being displayed in IMessageEditorController? I am using addFinding(IHttpRequestResponseWithMarkers,...) to add to an ArrayList that is linked to a TableModel/JTable.

Uthman, PortSwigger Agent | Last updated: Feb 22, 2021 10:49AM UTC

applyMarkers will only provide highlighting in certain situations, such as specifying Intruder payload positions, Scanner insertion points, and highlights in Scanner issues, rather than in the general editor. If you implement IMessageEditor, syntax highlighting will available by default.

michael | Last updated: Feb 23, 2021 12:11PM UTC

"syntax highlighting will available by default." you mean that the user can select it? because the interface only has getters, i.e., getSelectedData(), getSelectionBounds(), not setters

Uthman, PortSwigger Agent | Last updated: Feb 24, 2021 01:54PM UTC

Apologies, the syntax highlighting is separate to applying the markers. Are you trying to apply markers to a specific part of a request? Have you looked into the Search box visible in the Request/Response? When you type a term in there, it highlights it for you. What are you trying to do?

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