Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
4ra1n committed Jan 18, 2023
1 parent 89e2e19 commit 035ba2b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -236,5 +236,6 @@ Others:
- [important] [improve] CPU占用较高需要进行优化 #128
- [bug] 提示文字的翻译有误 #133
- [feat] 被动扫描允许自由设置(目前仅支持127) #131
- [improve] 查看搜索PoC时应该排序以提高效率 #134
- [improve] 不常用的配置应该都移到高级配置中 #132
- [improve] 避免直接使用其他项目的图标 #130
5 changes: 5 additions & 0 deletions src/main/java/com/chaitin/xray/form/AllPoCForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import javax.swing.text.StyleContext;
import java.awt.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Locale;

Expand Down Expand Up @@ -51,11 +52,15 @@ public AllPoCForm() {
}
}
StringBuilder sb = new StringBuilder();

Collections.sort(result);

for (String r : result) {
sb.append(r);
sb.append("\n");
}
pocList.setText(sb.toString());
pocList.setCaretPosition(0);
});
}

Expand Down
8 changes: 7 additions & 1 deletion src/main/java/com/chaitin/xray/model/Poc.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import com.chaitin.xray.utils.StringUtil;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;

Expand Down Expand Up @@ -34,7 +36,11 @@ public static HashSet<String> getPocList() {

public static String getString() {
StringBuilder sb = new StringBuilder();
for (String s : pocList) {

List<String> finalList = new ArrayList<>(pocList);
Collections.sort(finalList);

for (String s : finalList) {
sb.append(s);
sb.append("\n");
}
Expand Down

0 comments on commit 035ba2b

Please sign in to comment.