Files
HaE/src/main/java/burp/action/DoAction.java

38 lines
1.1 KiB
Java
Raw Normal View History

2021-06-10 22:59:27 +08:00
package burp.action;
2022-04-08 17:21:40 +08:00
import java.util.HashMap;
2021-06-10 22:59:27 +08:00
import java.util.Map;
import burp.Config;
import java.util.ArrayList;
import java.util.List;
/*
* @author EvilChen
*/
public class DoAction {
2022-04-08 17:21:40 +08:00
public Map<String, String> extractString(Map<String, Map<String, Object>> obj) {
Map<String, String> resultMap = new HashMap<String, String>();
2021-06-10 22:59:27 +08:00
obj.keySet().forEach(i->{
Map<String, Object> tmpMap = obj.get(i);
String data = tmpMap.get("data").toString();
2022-04-08 17:21:40 +08:00
resultMap.put(i, String.format("%s\n", data).intern());
2021-06-10 22:59:27 +08:00
});
2022-04-08 17:21:40 +08:00
return resultMap;
2021-06-10 22:59:27 +08:00
}
2021-09-12 15:23:54 +08:00
public List<List<String>> highlightAndComment(Map<String, Map<String, Object>> obj) {
2021-09-07 22:09:42 +08:00
List<String> colorList = new ArrayList<>();
2021-09-12 15:23:54 +08:00
List<String> commentList = new ArrayList<>();
List<List<String>> result = new ArrayList<>();
2021-06-10 22:59:27 +08:00
obj.keySet().forEach(i->{
Map<String, Object> tmpMap = obj.get(i);
String color = tmpMap.get("color").toString();
colorList.add(color);
2021-09-12 15:23:54 +08:00
commentList.add(i);
2021-06-10 22:59:27 +08:00
});
2021-09-12 15:23:54 +08:00
result.add(colorList);
result.add(commentList);
return result;
2021-06-10 22:59:27 +08:00
}
}