|
|
|
@@ -4,11 +4,12 @@ import java.awt.BorderLayout;
|
|
|
|
import java.awt.Color;
|
|
|
|
import java.awt.Color;
|
|
|
|
import java.awt.Component;
|
|
|
|
import java.awt.Component;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.regex.Matcher;
|
|
|
|
|
|
|
|
import java.util.regex.Pattern;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.json.*;
|
|
|
|
import org.json.*;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import jregex.Matcher;
|
|
|
|
|
|
|
|
import jregex.Pattern;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.JFrame;
|
|
|
|
import javax.swing.JFrame;
|
|
|
|
import javax.swing.JOptionPane;
|
|
|
|
import javax.swing.JOptionPane;
|
|
|
|
import javax.swing.DefaultCellEditor;
|
|
|
|
import javax.swing.DefaultCellEditor;
|
|
|
|
@@ -62,7 +63,7 @@ public class BurpExtender implements IBurpExtender, IHttpListener, IMessageEdito
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.callbacks = callbacks;
|
|
|
|
this.callbacks = callbacks;
|
|
|
|
// 设置插件名字和版本
|
|
|
|
// 设置插件名字和版本
|
|
|
|
String version = "1.4.1";
|
|
|
|
String version = "1.4.2";
|
|
|
|
|
|
|
|
|
|
|
|
callbacks.setExtensionName(String.format("HaE (%s) - Highlighter and Extractor", version));
|
|
|
|
callbacks.setExtensionName(String.format("HaE (%s) - Highlighter and Extractor", version));
|
|
|
|
|
|
|
|
|
|
|
|
@@ -413,13 +414,14 @@ public class BurpExtender implements IBurpExtender, IHttpListener, IMessageEdito
|
|
|
|
List<String> result = new ArrayList<String>();
|
|
|
|
List<String> result = new ArrayList<String>();
|
|
|
|
|
|
|
|
|
|
|
|
if(isLoaded && (scope.equals(scopeString) || scope.equals("any")) && (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);
|
|
|
|
Pattern pattern = new Pattern(regex);
|
|
|
|
Matcher matcher = pattern.matcher(contentString);
|
|
|
|
Matcher matcher = pattern.matcher(contentString);
|
|
|
|
while (matcher.find()) {
|
|
|
|
while (matcher.find()) {
|
|
|
|
// 添加匹配数据至list
|
|
|
|
// 添加匹配数据至list
|
|
|
|
// 强制用户使用()包裹正则
|
|
|
|
// 强制用户使用()包裹正则
|
|
|
|
result.add(matcher.group(1));
|
|
|
|
result.add(matcher.group(1));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 去除重复内容
|
|
|
|
// 去除重复内容
|
|
|
|
HashSet tmpList = new HashSet(result);
|
|
|
|
HashSet tmpList = new HashSet(result);
|
|
|
|
result.clear();
|
|
|
|
result.clear();
|
|
|
|
@@ -435,11 +437,11 @@ public class BurpExtender implements IBurpExtender, IHttpListener, IMessageEdito
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return tabContent;
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
return new JSONObject();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return tabContent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
|