Skip to content

Commit

Permalink
Integrated the new information provided by the API.
Browse files Browse the repository at this point in the history
  • Loading branch information
HoLyVieR committed Jan 20, 2019
1 parent fb632bf commit 3289b72
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
Binary file modified lib/endpointfinder-java-0.0.1-SNAPSHOT.jar
Binary file not shown.
27 changes: 20 additions & 7 deletions src/main/java/burp/TabResults.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<EndpointEntry> 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");
Expand Down

0 comments on commit 3289b72

Please sign in to comment.