Version: 4.0.1 Update
This commit is contained in:
@@ -18,7 +18,7 @@ public class HaE implements BurpExtension {
|
||||
@Override
|
||||
public void initialize(MontoyaApi api) {
|
||||
// 设置扩展名称
|
||||
String version = "4.0";
|
||||
String version = "4.0.1";
|
||||
api.extension().setName("HaE - Highlighter and Extractor");
|
||||
|
||||
// 加载扩展后输出的项目信息
|
||||
|
||||
@@ -111,7 +111,7 @@ public class RegularMatcher {
|
||||
}
|
||||
}
|
||||
|
||||
public static void putDataToGlobalMap(MontoyaApi api, String host, String name, List<String> dataList, boolean flag) {
|
||||
public synchronized static void putDataToGlobalMap(MontoyaApi api, String host, String name, List<String> dataList, boolean flag) {
|
||||
// 添加到全局变量中,便于Databoard检索
|
||||
if (!Objects.equals(host, "") && host != null) {
|
||||
Config.globalDataMap.compute(host, (existingHost, existingMap) -> {
|
||||
|
||||
@@ -19,23 +19,7 @@ public class DataManager {
|
||||
this.persistence = api.persistence();
|
||||
}
|
||||
|
||||
private void saveIndex(String indexName, String indexValue) {
|
||||
PersistedList<String> indexList = persistence.extensionData().getStringList(indexName);
|
||||
|
||||
if (indexList != null && !indexList.isEmpty()) {
|
||||
persistence.extensionData().deleteStringList(indexName);
|
||||
} else {
|
||||
indexList = PersistedList.persistedStringList();
|
||||
}
|
||||
|
||||
if (!indexList.contains(indexValue)) {
|
||||
indexList.add(indexValue);
|
||||
}
|
||||
|
||||
persistence.extensionData().setStringList(indexName, indexList);
|
||||
}
|
||||
|
||||
public void putData(String dataType, String dataName, PersistedObject persistedObject) {
|
||||
public synchronized void putData(String dataType, String dataName, PersistedObject persistedObject) {
|
||||
if (persistence.extensionData().getChildObject(dataName) != null) {
|
||||
persistence.extensionData().deleteChildObject(dataName);
|
||||
}
|
||||
@@ -51,7 +35,22 @@ public class DataManager {
|
||||
// 2. 从索引获取数据
|
||||
loadHaEData(dataIndex);
|
||||
loadMessageData(messageIndex, messageTableModel);
|
||||
}
|
||||
|
||||
private void saveIndex(String indexName, String indexValue) {
|
||||
PersistedList<String> indexList = persistence.extensionData().getStringList(indexName);
|
||||
|
||||
if (indexList != null && !indexList.isEmpty()) {
|
||||
persistence.extensionData().deleteStringList(indexName);
|
||||
} else {
|
||||
indexList = PersistedList.persistedStringList();
|
||||
}
|
||||
|
||||
if (!indexList.contains(indexValue)) {
|
||||
indexList.add(indexValue);
|
||||
}
|
||||
|
||||
persistence.extensionData().setStringList(indexName, indexList);
|
||||
}
|
||||
|
||||
private void loadHaEData(PersistedList<String> dataIndex) {
|
||||
@@ -69,16 +68,18 @@ public class DataManager {
|
||||
if (messageIndex != null && !messageIndex.isEmpty()) {
|
||||
messageIndex.parallelStream().forEach(index -> {
|
||||
PersistedObject dataObj = persistence.extensionData().getChildObject(index);
|
||||
HttpRequestResponse messageInfo = dataObj.getHttpRequestResponse("messageInfo");
|
||||
String comment = dataObj.getString("comment");
|
||||
String color = dataObj.getString("color");
|
||||
HttpRequest request = messageInfo.request();
|
||||
HttpResponse response = messageInfo.response();
|
||||
String method = request.method();
|
||||
String url = request.url();
|
||||
String status = String.valueOf(response.statusCode());
|
||||
String length = String.valueOf(response.toByteArray().length());
|
||||
messageTableModel.add(messageInfo, url, method, status, length, comment, color, false);
|
||||
if (dataObj != null) {
|
||||
HttpRequestResponse messageInfo = dataObj.getHttpRequestResponse("messageInfo");
|
||||
String comment = dataObj.getString("comment");
|
||||
String color = dataObj.getString("color");
|
||||
HttpRequest request = messageInfo.request();
|
||||
HttpResponse response = messageInfo.response();
|
||||
String method = request.method();
|
||||
String url = request.url();
|
||||
String status = String.valueOf(response.statusCode());
|
||||
String length = String.valueOf(response.toByteArray().length());
|
||||
messageTableModel.add(messageInfo, url, method, status, length, comment, color, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ rules:
|
||||
rule:
|
||||
- name: Linkfinder
|
||||
loaded: true
|
||||
f_regex: (?:"|')(((?:[a-zA-Z]{1,10}://|//)[^"'/]{1,}\.[a-zA-Z]{2,}[^"']{0,})|((?:/|\.\./|\./)[^"'><,;|*()(%%$^/\\\[\]][^"'><,;|()]{1,})|([a-zA-Z0-9_\-/]{1,}/[a-zA-Z0-9_\-/]{1,}\.(?:[a-zA-Z]{1,4}|action)(?:[\?|#][^"|']{0,}|))|([a-zA-Z0-9_\-/]{1,}/[a-zA-Z0-9_\-/]{3,}(?:[\?|#][^"|']{0,}|))|([a-zA-Z0-9_\-]{1,}\.(?:\w)(?:[\?|#][^"|']{0,}|)))(?:"|')
|
||||
f_regex: (?:"|')((?:(?:[a-zA-Z]{1,10}://|//)[^"'/]{1,}\.[a-zA-Z]{2,}[^"']{0,})|(?:(?:(?:/|\.\./|\./)?[^"'><,;|*()(%%$^/\\\[\]][^"'><,;|()]{1,}\.[a-zA-Z]{1,4})|(?:(?:/|\.\./|\./)?[^"'><,;|*()(%%$^/\\\[\]][^"'><,;|()]{1,}/[^"'><,;|()]{1,}(?:\.[a-zA-Z]{1,4}|action)?)))(?:[\?|#][^"|']{0,})?(?:"|')
|
||||
s_regex: ''
|
||||
format: '{0}'
|
||||
color: gray
|
||||
|
||||
Reference in New Issue
Block a user