Created
          February 8, 2019 10:59 
        
      - 
      
 - 
        
Save pajswigger/8a86a7b5f0fa3e4ae4605b7bc4d3c523 to your computer and use it in GitHub Desktop.  
    Sample Burp Extension code to extract response markers
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package burp; | |
| import java.util.List; | |
| public class BurpExtender implements IBurpExtender | |
| { | |
| @Override | |
| public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) | |
| { | |
| IScanIssue[] issues = callbacks.getScanIssues(""); | |
| for(IScanIssue issue : issues) { | |
| IHttpRequestResponse[] messages = issue.getHttpMessages(); | |
| for(IHttpRequestResponse message : messages) { | |
| if(message instanceof IHttpRequestResponseWithMarkers) { | |
| IHttpRequestResponseWithMarkers messageMarkers = (IHttpRequestResponseWithMarkers) message; | |
| List<int[]> responseMarkers = messageMarkers.getResponseMarkers(); | |
| for(int[] marker : responseMarkers) { | |
| callbacks.printOutput(String.format("%d - %d", marker[0], marker[1])); | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment