Skip to content

Commit

Permalink
Merge branch 'master' of github.com:nccgroup/LoggerPlusPlus
Browse files Browse the repository at this point in the history
  • Loading branch information
CoreyD97 committed Jan 17, 2022
2 parents 5308856 + 65bbed9 commit cb130cb
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
5 changes: 3 additions & 2 deletions BappManifest.bmf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ Uuid: 470b7057b86f41c396a97903377f3d81
ExtensionType: 1
Name: Logger++
RepoName: logger-plus-plus
ScreenVersion: 3.18
SerialVersion: 14
ScreenVersion: 3.19.3
SerialVersion: 19
MinPlatformVersion: 0
ProOnly: False
Author: Soroush Dalili & Corey Arthur, NCC Group
ShortDescription: Logs requests and responses for all Burp tools in a sortable table.
EntryPoint: releases/LoggerPlusPlus.jar
BuildCommand: gradle jar
SupportedProducts: Pro, Community
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies {
compile 'org.elasticsearch.client:elasticsearch-rest-high-level-client:7.5.2'
compile 'org.apache.httpcomponents:httpclient:4.5.6'
compile 'org.apache.commons:commons-text:1.7'
compile 'org.apache.logging.log4j:log4j-core:2.12.1'
compile 'org.apache.logging.log4j:log4j-core:2.17.0'
// Test on unix system
testRuntime files('/home/corey/BurpSuitePro/burpsuite_pro.jar')
// Test on Windows System
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public void write(JsonWriter writer, List<LogEntry> logEntries) throws IOExcepti
writer.name("method").value(logEntry.method);
writer.name("url").value(logEntry.url.toString());
writer.name("httpVersion").value(logEntry.requestHttpVersion);
writer.name("origin").value(logEntry.origin);

writer.name("cookies").beginArray();
if (logEntry.hasCookieParam) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public class LogEntry {
public CookieJarStatus usesCookieJar = CookieJarStatus.NO;
public String responseHash;
public String redirectURL;
public String origin = "";
// public String[] regexAllReq = {"","","","",""};
// public String[] regexAllResp = {"","","","",""};

Expand Down Expand Up @@ -235,10 +236,12 @@ private Status processRequest() {
this.usesCookieJar = CookieJarStatus.YES;
}
}
} else if (headerItem[0].equals("referer")) {
} else if (headerItem[0].equalsIgnoreCase("referer")) {
this.referrerURL = headerItem[1];
} else if (headerItem[0].equals("content-type")) {
} else if (headerItem[0].equalsIgnoreCase("content-type")) {
this.requestContentType = headerItem[1];
} else if (headerItem[0].equalsIgnoreCase("origin")) {
this.origin = headerItem[1];
}
}
}
Expand Down Expand Up @@ -598,6 +601,8 @@ public Object getValueByKey(LogEntryField columnName) {
return this.sentCookies;
case USES_COOKIE_JAR:
return this.usesCookieJar.toString();
case ORIGIN:
return this.origin;
// case REGEX1REQ:
// return this.regexAllReq[0];
// case REGEX2REQ:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public enum LogEntryField {
SENTCOOKIES(FieldGroup.REQUEST, Boolean.class, "The value of the cookies header sent to the server.", "CookieString", "SentCookies", "Cookies"),
PARAMETER_COUNT(FieldGroup.REQUEST, Integer.class, "The number of parameters in the request.", "ParameterCount", "ParamCount"),
PARAMETERS(FieldGroup.REQUEST, String.class, "The parameters in the request.", "Parameters", "Params"),
ORIGIN(FieldGroup.REQUEST, String.class, "The Origin header", "Origin"),

//Response
BASE64_RESPONSE(FieldGroup.RESPONSE, String.class, "The entire response encoded in Base64", "AsBase64"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public enum Protocol {HTTP, HTTPS}
.append("{'id':" + PARAMETERS + ",'name':'Parameters','defaultVisibleName':'Parameters','visibleName':'Parameters','preferredWidth':150,'readonly':true,'order':" + colOrder++ + ",'visible':false,'description':'" + StringEscapeUtils.escapeJson(PARAMETERS.getDescription()) + "'},")
.append("{'id':" + REFLECTED_PARAMS + ",'name':'ReflectedParams','defaultVisibleName':'Reflected Params','visibleName':'Reflected Params','preferredWidth':150,'readonly':true,'order':" + colOrder++ + ",'visible':true,'description':'" + StringEscapeUtils.escapeJson(REFLECTED_PARAMS.getDescription()) + "'},")
.append("{'id':" + REFLECTION_COUNT + ",'name':'ReflectionCount','defaultVisibleName':'Reflection Count','visibleName':'Reflection Count','preferredWidth':150,'readonly':true,'order':" + colOrder++ + ",'visible':false,'description':'" + StringEscapeUtils.escapeJson(REFLECTION_COUNT.getDescription()) + "'},")
.append("{'id':" + ORIGIN + ",'name':'origin','defaultVisibleName':'Origin header','visibleName':'Origin header','preferredWidth':150,'readonly':true,'order':" + colOrder++ + ",'visible':false,'description':'" + StringEscapeUtils.escapeJson(ORIGIN.getDescription()) + "'},")
.append("{'id':" + MIME_TYPE + ",'name':'MimeType','defaultVisibleName':'MIME type','visibleName':'MIME type','preferredWidth':100,'readonly':true,'order':" + colOrder++ + ",'visible':false,'description':'" + StringEscapeUtils.escapeJson(MIME_TYPE.getDescription()) + "'},")
.append("{'id':" + NEW_COOKIES + ",'name':'NewCookies','defaultVisibleName':'New Cookies','visibleName':'New Cookies','preferredWidth':125,'readonly':true,'order':" + colOrder++ + ",'visible':true,'description':'" + StringEscapeUtils.escapeJson(NEW_COOKIES.getDescription()) + "'},")
.append("{'id':" + REQUEST_TIME + ",'name':'RequestTime','defaultVisibleName':'Request Time','visibleName':'Request Time','preferredWidth':150,'readonly':true,'order':" + colOrder++ + ",'visible':true,'description':'" + StringEscapeUtils.escapeJson(REQUEST_TIME.getDescription()) + "'},")
Expand Down

0 comments on commit cb130cb

Please sign in to comment.