Version: 2.5.1 Update

This commit is contained in:
ᴋᴇʏ
2023-10-18 00:51:01 +08:00
committed by GitHub
parent 1e1d51921d
commit 6c4073c8ee

View File

@@ -1,5 +1,6 @@
package burp.core.processor; package burp.core.processor;
import burp.BurpExtender;
import burp.core.GlobalCachePool; import burp.core.GlobalCachePool;
import burp.core.utils.HashCalculator; import burp.core.utils.HashCalculator;
import burp.core.utils.MatchTool; import burp.core.utils.MatchTool;
@@ -11,12 +12,8 @@ import dk.brics.automaton.RegExp;
import dk.brics.automaton.RunAutomaton; import dk.brics.automaton.RunAutomaton;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.util.Arrays; import java.util.*;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.ArrayList;
import java.util.List;
import jregex.Matcher; import jregex.Matcher;
import jregex.Pattern; import jregex.Pattern;
@@ -82,7 +79,7 @@ public class DataProcessingUnit {
case "any": case "any":
case "request": case "request":
case "response": case "response":
matchContent = new String(content, StandardCharsets.UTF_8).intern(); matchContent = new String(content, StandardCharsets.UTF_8);
break; break;
case "any header": case "any header":
case "request header": case "request header":
@@ -92,7 +89,7 @@ public class DataProcessingUnit {
case "any body": case "any body":
case "request body": case "request body":
case "response body": case "response body":
matchContent = new String(body, StandardCharsets.UTF_8).intern(); matchContent = new String(body, StandardCharsets.UTF_8);
break; break;
default: default:
break; break;
@@ -136,9 +133,8 @@ public class DataProcessingUnit {
String dataStr = String.join("\n", result); String dataStr = String.join("\n", result);
tmpMap.put("data", dataStr); tmpMap.put("data", dataStr);
finalMap.put(nameAndSize, tmpMap); finalMap.put(nameAndSize, tmpMap);
// 添加到全局变量中便于Databoard检索 // 添加到全局变量中便于Databoard检索
if (!host.isEmpty()) { if (!Objects.equals(host, "")) {
List<String> dataList = Arrays.asList(dataStr.split("\n")); List<String> dataList = Arrays.asList(dataStr.split("\n"));
if (ConfigEntry.globalDataMap.containsKey(host)) { if (ConfigEntry.globalDataMap.containsKey(host)) {
Map<String, List<String>> gRuleMap = new HashMap<>(ConfigEntry.globalDataMap.get(host)); Map<String, List<String>> gRuleMap = new HashMap<>(ConfigEntry.globalDataMap.get(host));