The Burp Suite User Forum was discontinued on the 1st November 2024.

Burp Suite User Forum

For support requests, go to the Support Center. To discuss with other Burp users, head to our Discord page.

SUPPORT CENTER DISCORD

IContextMenuFactory: ICONTEXT_TARGET_SITE_MAP_TABLE only returns Request and No Response

Douglas | Last updated: Nov 18, 2016 06:27PM UTC

menu.getSelectedMessages(); returns the proper Request/Responses for pretty much all of the locations, except for CONTEXT_TARGET_SITE_MAP_TABLE . For some reason I'm pulling the request with that one, but not response. Is there something special I need to do to get the full request/response?

Burp User | Last updated: Nov 18, 2016 07:58PM UTC

I don't know if this is the best way, but this works around the issue. I use what is passed in to search the SiteMap, and then compare the requests and store the Request/Response pair when the requests match. if (arg0.getActionCommand().equals(menuTitle)) { IHttpRequestResponse[] items = menu.getSelectedMessages(); //If in Target pane, we need more logic to get items if(context == CONTEXT_TARGET_SITE_MAP_TREE || context == CONTEXT_TARGET_SITE_MAP_TABLE){ List<IHttpRequestResponse> filtered = new ArrayList<IHttpRequestResponse>(); for(IHttpRequestResponse tree : items){ IRequestInfo requestInfo = helpers.analyzeRequest(tree); URL url = requestInfo.getUrl(); String protocol = url.getProtocol(); String host = url.getHost(); String port = ((protocol.equals("http") && url.getPort() == 80) || (protocol.equals("https") && url.getPort() == 443) ) ? "" : ":".concat(Integer.toString(url.getPort())); String path = url.getPath(); String search = protocol.concat("://").concat(host).concat(port).concat(path); int found = 0; String origRequest = helpers.bytesToString(tree.getRequest());//Get orig Request as String for Compare //Cycle through all items found for(IHttpRequestResponse searchItem : callbacks.getSiteMap(search)){ String searchRequest = helpers.bytesToString(searchItem.getRequest()); //If its from the Site Map Tree, just add it. If from Table, we only have the request now, so we need //To find the SiteMap search that matches up with it to get the response. if(context == CONTEXT_TARGET_SITE_MAP_TREE || (found == 0 && origRequest.equals(searchRequest)) ){ found = 1; filtered.add(searchItem); } } //Convert ArrayList back to Array for the answer; issueReqResp = new IHttpRequestResponse[filtered.size()]; issueReqResp = filtered.toArray(issueReqResp); } } else { issueReqResp = items; } tab.loadRequestResponses(issueReqResp); tab.selectTab(); tab.selectInstances(); }

PortSwigger Agent | Last updated: Nov 21, 2016 10:28AM UTC