2021-06-10 22:59:27 +08:00
|
|
|
package burp.action;
|
|
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import burp.Config;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* @author EvilChen
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
public class DoAction {
|
|
|
|
|
public String extractString(Map<String, Map<String, Object>> obj) {
|
|
|
|
|
String[] result = {""};
|
|
|
|
|
obj.keySet().forEach(i->{
|
|
|
|
|
Map<String, Object> tmpMap = obj.get(i);
|
|
|
|
|
String data = tmpMap.get("data").toString();
|
|
|
|
|
String tmpStr = String.format(Config.outputTplString, i, data).intern();
|
|
|
|
|
result[0] += tmpStr;
|
|
|
|
|
});
|
|
|
|
|
return result[0];
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
}
|