diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..ce38e91 Binary files /dev/null and b/.DS_Store differ diff --git a/README.md b/README.md index a287247..455dfd5 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ HaE supports three actions: 3. Color upgrade algorithm: **Two regulars expression, the colors are both orange, if the request are matched these, it will be upgraded to red.** 4. The configuration file format uses JSON format, the format is ``` - {name: {"loaded": isLoaded,"regex": regexText, "scope": request/response, "action": extract/highlight/any, "color": colorText}} + {name: {"loaded": isLoaded,"regex": regexText, "scope": request/response/any, "action": extract/highlight/any, "color": colorText}} ``` 5. Built-in simple cache to reduce the stuttering phenomenon in the `multi-regular, big data scenario`. diff --git a/README_zh.md b/README_zh.md index 39ec296..ce05e39 100644 --- a/README_zh.md +++ b/README_zh.md @@ -37,7 +37,7 @@ HaE支持三个动作: 3. 颜色升级算法: 利用下标的方式进行优先级排序,当满足2个同颜色条件则以优先级顺序上升颜色。(例如: **两个正则,颜色为橘黄色,该请求两个正则都匹配到了,那么将升级为红色**) 4. 简单的配置文件格式选用JSON格式,格式为 ``` - {name: {"loaded": isLoaded,"regex": regexText, "scope": request/response, "action": extract/highlight/any, "color": colorText}} + {name: {"loaded": isLoaded,"regex": regexText, "scope": request/response/any, "action": extract/highlight/any, "color": colorText}} ``` 5. 内置简单缓存,在“多正则、大数据”的场景下减少卡顿现象。 diff --git a/burp/BurpExtender.java b/burp/BurpExtender.java index be7d872..c0c340e 100644 --- a/burp/BurpExtender.java +++ b/burp/BurpExtender.java @@ -52,7 +52,7 @@ public class BurpExtender implements IBurpExtender, IHttpListener, IMessageEdito private static String initConfigContent = "{\"Email\":{\"loaded\":true,\"scope\":\"response\",\"regex\":\"([\\\\w-]+(?:\\\\.[\\\\w-]+)*@(?:[\\\\w](?:[\\\\w-]*[\\\\w])?\\\\.)+[\\\\w](?:[\\\\w-]*[\\\\w])?)\",\"action\":\"any\",\"color\":\"yellow\"}}"; private static String endColor = ""; private static String[] colorArray = new String[] {"red", "orange", "yellow", "green", "cyan", "blue", "pink", "magenta", "gray"}; - private static String[] scopeArray = new String[] {"response", "request"}; + private static String[] scopeArray = new String[] {"any", "response", "request"}; private static String[] actionArray = new String[] {"any", "extract", "highight"}; private static IMessageEditorTab HaETab; private static PrintWriter stdout; @@ -62,7 +62,7 @@ public class BurpExtender implements IBurpExtender, IHttpListener, IMessageEdito { this.callbacks = callbacks; // 设置插件名字和版本 - String version = "1.4"; + String version = "1.4.1"; callbacks.setExtensionName(String.format("HaE (%s) - Highlighter and Extractor", version)); @@ -412,7 +412,7 @@ public class BurpExtender implements IBurpExtender, IHttpListener, IMessageEdito String color = jsonObj1.getString("color"); List result = new ArrayList(); - if(isLoaded && scope.equals(scopeString) && (action.equals(actionString) || action.equals("any"))) { + if(isLoaded && (scope.equals(scopeString) || scope.equals("any")) && (action.equals(actionString) || action.equals("any"))) { Pattern pattern = Pattern.compile(regex); Matcher matcher = pattern.matcher(contentString); while (matcher.find()) {