diff --git a/src/burp/BurpExtender.java b/src/burp/BurpExtender.java index 93e42f0..5d5d376 100644 --- a/src/burp/BurpExtender.java +++ b/src/burp/BurpExtender.java @@ -449,7 +449,7 @@ public byte[] buildBulkRequest(ArrayList params) { } } -class JsonParamNameInsertionPoint extends ParamInsertionPoint { +class JsonParamNameInsertionPoint extends ParamNameInsertionPoint { byte[] headers; byte[] body; String baseInput; @@ -457,7 +457,7 @@ class JsonParamNameInsertionPoint extends ParamInsertionPoint { JsonElement root; public JsonParamNameInsertionPoint(byte[] request, String name, String value, byte type, String attackID) { - super(request, name, value, type); // BulkUtilities.encodeJSON(value) + super(request, name, value, type, attackID); int start = BulkUtilities.getBodyStart(request); this.attackID = attackID; headers = Arrays.copyOfRange(request, 0, start); diff --git a/src/burp/DiscoveredParam.java b/src/burp/DiscoveredParam.java index fffea8d..38d0bd5 100644 --- a/src/burp/DiscoveredParam.java +++ b/src/burp/DiscoveredParam.java @@ -58,7 +58,7 @@ public void explore() { canSeeCache = canSeeCache(workedAttack.getFirstRequest().getResponse()); IHttpRequestResponse scanBaseAttack = injector.probeAttack(name).getFirstRequest(); - ParamNameInsertionPoint insertionPoint = (ParamNameInsertionPoint) injector.getInsertionPoint(); + ParamNameInsertionPoint insertionPoint = (ParamNameInsertionPoint) injector.getInsertionPoint(); RawInsertionPoint valueInsertionPoint = insertionPoint.getValueInsertionPoint(name); if (type == BulkUtilities.PARAM_HEADER) { diff --git a/src/burp/OfferHostnameOverride.java b/src/burp/OfferHostnameOverride.java index 38a6899..012167a 100644 --- a/src/burp/OfferHostnameOverride.java +++ b/src/burp/OfferHostnameOverride.java @@ -16,7 +16,10 @@ public class OfferHostnameOverride implements ContextMenuItemsProvider { public List provideMenuItems(ContextMenuEvent event) { List menuItemList = new ArrayList<>(); - + if (event.selectedRequestResponses().isEmpty()) { + return menuItemList; + } + HttpRequestResponse requestResponse = event.messageEditorRequestResponse().isPresent() ? event.messageEditorRequestResponse().get().requestResponse() : event.selectedRequestResponses().get(0); String serviceHost = requestResponse.httpService().host(); String hostHeader = requestResponse.request().headerValue("host");