()
| 79 | Map.Entry<String, IHttpRequestResponse> entry = (Map.Entry<String, IHttpRequestResponse>) obj; |
| 80 | new Thread(new Runnable() { |
| 81 | @Override |
| 82 | public void run() { |
| 83 | int num; |
| 84 | Object lockObj = PassiveScanner.this.lock; |
| 85 | boolean isTargetScan = false; |
| 86 | if (apiTypes.size() == 1) { |
| 87 | isTargetScan = true; |
| 88 | } |
| 89 | |
| 90 | List<ApiEndpoint> apiEndpoints = apiType.parseApiDocument(entry.getValue(), basePath, isTargetScan); |
| 91 | apiEndpoints.sort(Comparator.comparing(ApiEndpoint::getUrl)); |
| 92 | ArrayList<ApiDetailEntity> apiDetails = new ArrayList<>(); |
| 93 | |
| 94 | for (ApiEndpoint endpoint : apiEndpoints) { |
| 95 | IHttpRequestResponse apiParseRequestResponse = endpoint.getHttpRequestResponse(); |
| 96 | ApiDetailEntity currentDetail = createApiDetailEntity(endpoint, apiParseRequestResponse, apiType); |
| 97 | if (apiParseRequestResponse instanceof HttpRequestResponse) { |
| 98 | ((HttpRequestResponse) apiParseRequestResponse).setUpdateAcceptor(currentDetail); |
| 99 | } |
| 100 | apiDetails.add(currentDetail); |
| 101 | } |
| 102 | |
| 103 | synchronized (lockObj) { |
| 104 | num = PassiveScanner.this.scannedCount++; |
| 105 | } |
| 106 | ApiDocumentEntity apiDocument = new ApiDocumentEntity(num, (String) entry.getKey(), BurpExtender.getHelpers().analyzeResponse(((IHttpRequestResponse) entry.getValue()).getResponse()).getStatusCode(), apiType.getApiTypeName(), "true", (IHttpRequestResponse) entry.getValue(), CommonUtils.getCurrentDateTime(), Integer.parseInt(CommonUtils.getContentLength((IHttpRequestResponse) entry.getValue())), apiDetails); |
| 107 | extensionTab.addApiDocument(apiDocument); |
| 108 | } |
| 109 | }).start(); |
| 110 | } |
| 111 | issues.addAll(apiType.exportIssues()); |
nothing calls this directly
no test coverage detected