Skip to content

Commit ab6a298

Browse files
authored
Merge pull request #8 from Chave0v0/dev
调整高亮颜色
2 parents 94d5e23 + b7ee233 commit ab6a298

File tree

6 files changed

+5
-17
lines changed

6 files changed

+5
-17
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ Java 版本不仅更好地与 BurpSuite 环境集成,而且通过减少第三
245245

246246
#### 功能效果
247247

248-
开启敏感信息检查后,当 API 列表中匹配到敏感信息时,`history` 中标记为 `红色`,同时列出匹配到的字段信息。
248+
开启敏感信息检查后,当 API 列表中匹配到敏感信息时,`history` 中标记为 `橙色`,同时列出匹配到的字段信息。
249249

250-
![image-20250203232046025](assets/image-20250203232046025.png)
250+
![image-20250204203345613](assets/image-20250204203345613.png)
251251

252252
同时 API 列表中 `Result` 字段提示 `存在敏感信息`
253253

assets/image-20250203232046025.png

-369 KB
Binary file not shown.

assets/image-20250204203345613.png

374 KB
Loading

src/main/java/com/chave/handler/APIHighLighterHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public RequestToBeSentAction handleHttpRequestToBeSent(HttpRequestToBeSent reque
4141
HashMap result = sensitiveInfoMatchService.sensitiveInfoMatch(requestToBeSent);
4242
if (!result.isEmpty()) {
4343
// 对history进行红色高亮处理
44-
Util.setHighlightColor(requestToBeSent, Color.RED);
44+
Util.setHighlightColor(requestToBeSent, Color.ORANGE);
4545

4646
if (APIMatchService.MATCHED_ITEM.getResult() != null && !APIMatchService.MATCHED_ITEM.getResult().contains("敏感信息")) {
4747
APIMatchService.MATCHED_ITEM.setResult(APIMatchService.MATCHED_ITEM.getResult() + "/存在敏感信息");
@@ -68,7 +68,7 @@ public ResponseReceivedAction handleHttpResponseReceived(HttpResponseReceived re
6868
HashMap result = sensitiveInfoMatchService.sensitiveInfoMatch(responseReceived);
6969
if (!result.isEmpty()) {
7070
// 对history进行红色高亮处理
71-
Util.setHighlightColor(responseReceived, Color.RED);
71+
Util.setHighlightColor(responseReceived, Color.ORANGE);
7272

7373
if (APIMatchService.MATCHED_ITEM.getResult() != null && !APIMatchService.MATCHED_ITEM.getResult().contains("存在敏感信息")) {
7474
APIMatchService.MATCHED_ITEM.setResult(APIMatchService.MATCHED_ITEM.getResult() + "/存在敏感信息");

src/main/java/com/chave/ui/HighlighterMainUI.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ public HighlighterMainUI() {
5555
}
5656

5757
private void initHighlighterUI() {
58-
// 定义各种组件
59-
60-
6158

6259
// 创建主面板并设置 BoxLayout 垂直排列
6360
highlighterPanel = new JPanel();
@@ -425,7 +422,7 @@ public void actionPerformed(ActionEvent e) {
425422
HashMap responseResult = sensitiveInfoMatchService.sensitiveInfoMatch(response);
426423
if (!requestResult.isEmpty() || !responseResult.isEmpty()) {
427424
// 对history进行红色高亮处理
428-
Util.setHighlightColor(proxyHttpRequestResponse, com.chave.config.Color.RED);
425+
Util.setHighlightColor(proxyHttpRequestResponse, com.chave.config.Color.ORANGE);
429426

430427
if (APIMatchService.MATCHED_ITEM.getResult() != null && !APIMatchService.MATCHED_ITEM.getResult().contains("敏感信息")) {
431428
APIMatchService.MATCHED_ITEM.setResult(APIMatchService.MATCHED_ITEM.getResult() + "/存在敏感信息");

src/main/java/com/chave/ui/SensitiveInfoMainUI.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import burp.api.montoya.logging.Logging;
44
import com.chave.Main;
5-
import com.chave.config.APIConfig;
65
import com.chave.config.SensitiveInfoConfig;
76
import com.chave.pojo.RuleItem;
87
import com.chave.utils.Util;
@@ -245,14 +244,6 @@ private void operateRuleDialog(String operation) {
245244
String[] scopeOptions = {"any", "request", "response"};
246245
JComboBox scopeComboBox = new JComboBox(scopeOptions);
247246

248-
// 调整组件大小
249-
// nameTextField.setMinimumSize(new Dimension(300, 25));
250-
// nameTextField.setMaximumSize(new Dimension(300, 25));
251-
// regexTextField.setMinimumSize(new Dimension(300, 25));
252-
// regexTextField.setMaximumSize(new Dimension(300, 25));
253-
// scopeComboBox.setMinimumSize(new Dimension(300, 25));
254-
// scopeComboBox.setMaximumSize(new Dimension(300, 25));
255-
256247
// 设置布局
257248
BoxLayout addRuleMainLayout = new BoxLayout(operateRuleMainPanel, BoxLayout.Y_AXIS);
258249
BoxLayout nameLayout = new BoxLayout(namePanel, BoxLayout.X_AXIS);

0 commit comments

Comments
 (0)