Version: 4.0.2 Update

This commit is contained in:
gh0stkey
2025-01-08 13:49:12 +08:00
parent 7e53e250af
commit a06ef8e25e
6 changed files with 57 additions and 30 deletions

View File

@@ -29,7 +29,6 @@ public class Config extends JPanel {
private final ConfigLoader configLoader;
private final MessageTableModel messageTableModel;
private final Rules rules;
private final boolean isProfessionalVersion;
private Registration activeHandler;
private Registration passiveHandler;
@@ -39,15 +38,9 @@ public class Config extends JPanel {
this.configLoader = configLoader;
this.messageTableModel = messageTableModel;
this.rules = rules;
// 检查版本并记录日志
this.isProfessionalVersion = api.burpSuite().version().name().contains("Professional");
api.logging().logToOutput("Current Burp Suite Version: " + api.burpSuite().version().name());
this.activeHandler = api.http().registerHttpHandler(new HttpMessageActiveHandler(api, configLoader, messageTableModel));
if (isProfessionalVersion) {
this.passiveHandler = api.scanner().registerScanCheck(new HttpMessagePassiveHandler(api, configLoader, messageTableModel));
}
this.passiveHandler = api.scanner().registerScanCheck(new HttpMessagePassiveHandler(api, configLoader, messageTableModel));
initComponents();
}
@@ -142,6 +135,7 @@ public class Config extends JPanel {
modePanel.setLayout(new BoxLayout(modePanel, BoxLayout.X_AXIS));
JCheckBox checkBox = new JCheckBox("Enable active http message handler");
checkBox.setEnabled(hae.Config.proVersionStatus);
modePanel.add(checkBox);
checkBox.addActionListener(e -> updateModeStatus(checkBox));
checkBox.setSelected(configLoader.getMode());
@@ -386,7 +380,7 @@ public class Config extends JPanel {
configLoader.setMode(selected ? "true" : "false");
if (checkBox.isSelected()) {
if (isProfessionalVersion && passiveHandler.isRegistered()) {
if (hae.Config.proVersionStatus && passiveHandler.isRegistered()) {
passiveHandler.deregister();
}
@@ -394,7 +388,7 @@ public class Config extends JPanel {
activeHandler = api.http().registerHttpHandler(new HttpMessageActiveHandler(api, configLoader, messageTableModel));
}
} else {
if (isProfessionalVersion && !passiveHandler.isRegistered()) {
if (hae.Config.proVersionStatus && !passiveHandler.isRegistered()) {
passiveHandler = api.scanner().registerScanCheck(new HttpMessagePassiveHandler(api, configLoader, messageTableModel));
}