MCPcopy Index your code
hub / github.com/XF-FS/APIKit / run

Method run

src/main/java/burp/PassiveScanner.java:81–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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());

Callers

nothing calls this directly

Calls 11

createApiDetailEntityMethod · 0.95
getHelpersMethod · 0.95
getCurrentDateTimeMethod · 0.95
getContentLengthMethod · 0.95
setUpdateAcceptorMethod · 0.80
addMethod · 0.80
addApiDocumentMethod · 0.80
parseApiDocumentMethod · 0.65
getApiTypeNameMethod · 0.65
getResponseMethod · 0.45

Tested by

no test coverage detected