Skip to content

Commit

Permalink
Version: 2.4.5 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
AnonymousUser committed Dec 18, 2022
1 parent 48e355a commit df4496d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/main/java/burp/BurpExtender.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public void stateChanged(ChangeEvent arg0) {
public boolean isEnabled(byte[] content, boolean isRequest) {
String c = new String(content, StandardCharsets.UTF_8).intern();
List<Map<String, String>> result = pm.processMessageByContent(helpers, content, isRequest, false, "");

if (result != null && !result.isEmpty()) {
Map<String, String> dataMap = result.get(0);
if (isRequest) {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/burp/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public class Config {

public static String[] scopeArray = new String[] {
"any",
"any header",
"any body",
"response",
"response header",
"response body",
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/burp/action/ExtractContent.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,25 @@ public Map<String, Map<String, Object>> matchRegex(byte[] content, String header
String engine = objects[5].toString();
boolean sensitive = (Boolean) objects[6];
// 判断规则是否开启与作用域
if (loaded && (scope.contains(scopeString) || "any".equals(scope))) {
if (loaded && (scope.contains(scopeString) || scope.contains("any"))) {
switch (scope) {
case "any":
case "request":
case "response":
matchContent = new String(content, StandardCharsets.UTF_8).intern();
break;
case "any header":
case "request header":
case "response header":
matchContent = headers;
break;
case "any body":
case "request body":
case "response body":
matchContent = new String(body, StandardCharsets.UTF_8).intern();
break;
default:
break;
return;
}

if ("nfa".equals(engine)) {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/burp/action/ProcessMessage.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package burp.action;

import burp.BurpExtender;
import burp.IExtensionHelpers;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down

0 comments on commit df4496d

Please sign in to comment.