Skip to content

Commit 4ac775d

Browse files
committed
Bigfix
Fixed an issue where the header would get repeatedly added to requests. Each request would add another User-Agent header.
1 parent 7bdb9ac commit 4ac775d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

burpua.jar

59 Bytes
Binary file not shown.

src/burp/BurpExtender.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Name: Burp UserAgent
3-
* Version: 0.4
3+
* Version: 0.5
44
* Date: 7/1/2015
55
* Author: Josh Berry - josh.berry@codewatch.org
66
* Github: https://github.com/codewatchorg/Burp-UserAgent
@@ -32,7 +32,7 @@ public class BurpExtender implements IBurpExtender, ISessionHandlingAction, ITab
3232
public IBurpExtenderCallbacks extCallbacks;
3333
public IExtensionHelpers extHelpers;
3434
public JPanel bUAPanel;
35-
private static final String burpUAVersion = "0.4";
35+
private static final String burpUAVersion = "0.5";
3636
private PrintWriter printOut;
3737
private String newUA = "Current Browser";
3838
private String configFile = "useragents.xml";
@@ -183,9 +183,11 @@ public void performAction(IHttpRequestResponse currentRequest, IHttpRequestRespo
183183
for (int i = 0; i < headers.size(); i++) {
184184

185185
/* Set to the selected user-agent */
186-
if (headers.get(i).startsWith("User-Agent:") && !headers.get(i).startsWith("User-Agent: " + newUA)) {
186+
if (headers.get(i).startsWith("User-Agent:") && !headers.get(i).startsWith("User-Agent: " + newUA)) {
187187
headers.set(i, "User-Agent: " + newUA);
188188
uaInHeader = 1;
189+
} else if (headers.get(i).startsWith("User-Agent: " + newUA)) {
190+
uaInHeader = 1;
189191
}
190192
}
191193
}

0 commit comments

Comments
 (0)