From d7b2122ae942f029412299950da56e3a0cacc906 Mon Sep 17 00:00:00 2001 From: 4ra1n Date: Mon, 28 Nov 2022 15:35:58 +0800 Subject: [PATCH] changelog --- CHANGELOG.MD | 5 +++++ src/main/java/com/chaitin/xray/form/MainForm.java | 7 ++++++- src/main/java/com/chaitin/xray/form/RadForm.java | 3 +-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 5edf30f..c0f135e 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -118,6 +118,10 @@ Others: ## 0.8 +重要功能更新:可以与`rad`联动;可以为独立反连平台导出配置文件 + +重要`bug`说明: + 之前版本有反馈说CPU消耗过高,是因为之前没有停止的逻辑,意味着每运行一次新任务开两个新线程,一个执行一个监视。 当执行线程结束,监视线程不会停止,任务过多时导致CPU消耗极高。虽然之前版本可以通过点击强制停止使所有监视线程停下,解决问题。 但这种情况需要得到一个合理的解决,这个版本中,主动扫描也有停止扫描的按钮。 @@ -130,6 +134,7 @@ Bugs: - [bug] 查看所有poc界面使用新字体后可能有意外行为 #70 Others: +- [new feature] 添加rad爬虫联动 #22 - 为反连平台添加导出配置文件的功能 #59 - 控制台使用更好看的字体 #67 - 加入跳转在线生成poc的按钮 #66 diff --git a/src/main/java/com/chaitin/xray/form/MainForm.java b/src/main/java/com/chaitin/xray/form/MainForm.java index 9c0545e..9400bf6 100644 --- a/src/main/java/com/chaitin/xray/form/MainForm.java +++ b/src/main/java/com/chaitin/xray/form/MainForm.java @@ -47,6 +47,7 @@ public class MainForm { private static final List existOutputList = new ArrayList<>(); private static DB db; + public RadForm radInstance; private JButton choseDirButton; private JPanel SuperXray; private JPanel pathButtonPanel; @@ -1583,6 +1584,9 @@ public void refreshLang() { private void initExit() { Runtime.getRuntime().addShutdownHook(new Thread(() -> { instance.stop = true; + if (radInstance != null) { + radInstance.stop = true; + } try { Thread.sleep(3000); } catch (Exception ignored) { @@ -1607,7 +1611,8 @@ private void initFont() { private void initGetRad() { radButton.addActionListener(e -> { JFrame frame = new JFrame("Rad Command"); - frame.setContentPane(new RadForm(portText.getText()).radPanel); + radInstance = new RadForm(portText.getText()); + frame.setContentPane(radInstance.radPanel); frame.setResizable(false); frame.pack(); frame.setVisible(true); diff --git a/src/main/java/com/chaitin/xray/form/RadForm.java b/src/main/java/com/chaitin/xray/form/RadForm.java index 9621c92..0c8699c 100644 --- a/src/main/java/com/chaitin/xray/form/RadForm.java +++ b/src/main/java/com/chaitin/xray/form/RadForm.java @@ -34,8 +34,7 @@ public class RadForm { private JLabel startLabel; private static RadCmd radCmd; - - private volatile boolean stop = false; + public volatile boolean stop = false; private void execAndFresh(String[] finalCmd) { outputTextArea.setText(null);