diff --git a/lib/endpointfinder-java-0.0.1-SNAPSHOT.jar b/lib/endpointfinder-java-0.0.1-SNAPSHOT.jar index 0cfdc22..e912cb3 100644 Binary files a/lib/endpointfinder-java-0.0.1-SNAPSHOT.jar and b/lib/endpointfinder-java-0.0.1-SNAPSHOT.jar differ diff --git a/src/main/java/burp/TabResults.java b/src/main/java/burp/TabResults.java index 951167b..8213f2c 100644 --- a/src/main/java/burp/TabResults.java +++ b/src/main/java/burp/TabResults.java @@ -3,13 +3,10 @@ import java.awt.Component; import java.util.List; -import javax.swing.JLabel; - -import burp.IMessageEditorController; -import burp.IMessageEditorTab; import ca.zhack.endpointfinder.EndpointEntry; import ca.zhack.endpointfinder.EndpointFinder; import ca.zhack.endpointfinder.EndpointResult; +import ca.zhack.endpointfinder.Position; public class TabResults implements IMessageEditorTab { private ITextEditor displayContent; @@ -73,15 +70,31 @@ public void setMessage(byte[] message, boolean isRequest) { if (startContent > 0) { try { + String stringToParse = httpContent.substring(startContent) + 4; StringBuilder display = new StringBuilder(); - EndpointResult result = EndpointFinder.getEndpoints(httpContent.substring(startContent) + 4); + EndpointResult result = EndpointFinder.getEndpoints(stringToParse); List entries = result.getEntries(); display.append("Results (" + entries.size() + ")"); for (EndpointEntry entry : entries) { - display.append("\n\n--------------------\n\n"); - display.append("Path : " + entry.getPath()); + display.append("--------------------\n\n"); + display.append("Path : " + entry.getPath() + "\n"); + + + if (entry.getUnknownPosition().size() > 0) { + int positionNumber = 1; + for (Position pos : entry.getUnknownPosition()) { + String formatUnknowInfo = "Variable #%d : %s (start: %d, end: %d)\n"; + display.append(String.format( + formatUnknowInfo, + positionNumber, + stringToParse.substring(pos.getStart(), pos.getEnd()), + pos.getStart(), + pos.getEnd() + )); + } + } } display.append("\n\n--------------------\n\n");