Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.

Commit

Permalink
Protocol is now passed to xss-detectors
Browse files Browse the repository at this point in the history
  • Loading branch information
forced-request committed Sep 15, 2014
1 parent d47a8e2 commit 825290d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions burp-extender/src/burp/BurpExtender.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public Component getUiComponent() {
* Parse URL and cookie values from intruderRequest
* return for use in xss-detectors
*/
public String[] fetchRequestVals(byte[] intruderRequest) {
public String[] fetchRequestVals(byte[] intruderRequest, String proto) {
String request = this.helpers.bytesToString(intruderRequest);

String urlPattern = "(GET|POST) (.*) H";
Expand Down Expand Up @@ -242,8 +242,7 @@ public String[] fetchRequestVals(byte[] intruderRequest) {
while(cookieMatcher.find()) {
cookies = cookieMatcher.group(1);
}

intruderUrl = intruderHost + intruderUrl;
intruderUrl = proto + "://" + intruderHost + intruderUrl;

String[] requestVals = new String[2];
requestVals[0] = intruderUrl;
Expand All @@ -258,7 +257,7 @@ public void processHttpMessage(int toolFlag, boolean messageIsRequest,
if ((toolFlag == 32) && (!messageIsRequest)) {

// Grab request information from messageInfo.getRequest()
String[] requestInfo = fetchRequestVals(messageInfo.getRequest());
String[] requestInfo = fetchRequestVals(messageInfo.getRequest(), messageInfo.getHttpService().getProtocol());
String intruderURL = requestInfo[0];
String cookies = requestInfo[1];

Expand Down

0 comments on commit 825290d

Please sign in to comment.