Skip to content

Commit

Permalink
Upgrade Montoya API + add additional debug logging to log processor.
Browse files Browse the repository at this point in the history
  • Loading branch information
CoreyD97 committed Mar 15, 2023
1 parent fb67ba2 commit b624552
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repositories {
}

dependencies {
implementation 'net.portswigger.burp.extensions:montoya-api:1.0.0'
implementation 'net.portswigger.burp.extensions:montoya-api:2023.3'
implementation 'org.swinglabs:swingx:1.6.1'
implementation 'com.github.CoreyD97:Burp-Montoya-Utilities:07e3e02b'
implementation 'org.elasticsearch.client:elasticsearch-rest-high-level-client:7.15.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public ResponseReceivedAction handleHttpResponseReceived(HttpResponseReceived re
Annotations annotations = responseReceived.annotations();
if (responseReceived.toolSource().isFromTool(ToolType.PROXY)) {
//If the request came from the proxy, the response isn't final yet.
//Instead, the response must be taken from the proxy response handler.
//Just tag the comment with the identifier so we can match it up later.
// Integer identifier = System.identityHashCode(responseReceived.initiatingRequest());
// annotations = LogProcessorHelper.addIdentifierInComment(identifier, annotations);
Expand Down Expand Up @@ -229,6 +230,7 @@ public ProxyResponseToBeSentAction handleResponseToBeSent(InterceptedResponse in
* @param response The HTTP request response object.
*/
private void updateRequestWithResponse(Integer entryIdentifier, Date arrivalTime, HttpResponse response) {
log.debug("Updating entry with response for ID: " + entryIdentifier);
if (entriesPendingProcessing.containsKey(entryIdentifier)) {
//Not yet started processing the entry, we can add the response so it is processed in the first pass
final LogEntry logEntry = entriesPendingProcessing.get(entryIdentifier);
Expand Down Expand Up @@ -291,6 +293,7 @@ LogEntry processEntry(final LogEntry logEntry){
}

private void submitNewEntryProcessingRunnable(final LogEntry logEntry){
log.debug("Adding log process request for ID: " + logEntry.getIdentifier());
entriesPendingProcessing.put(logEntry.getIdentifier(), logEntry);
RunnableFuture<LogEntry> processingRunnable = new FutureTask<>(() -> {
entriesPendingProcessing.remove(logEntry.getIdentifier());
Expand Down

0 comments on commit b624552

Please sign in to comment.