@@ -29,6 +29,7 @@ public class Config extends JPanel {
|
|||||||
private final ConfigLoader configLoader;
|
private final ConfigLoader configLoader;
|
||||||
private final MessageTableModel messageTableModel;
|
private final MessageTableModel messageTableModel;
|
||||||
private final Rules rules;
|
private final Rules rules;
|
||||||
|
private final boolean isProfessionalVersion;
|
||||||
|
|
||||||
private Registration activeHandler;
|
private Registration activeHandler;
|
||||||
private Registration passiveHandler;
|
private Registration passiveHandler;
|
||||||
@@ -39,8 +40,14 @@ public class Config extends JPanel {
|
|||||||
this.messageTableModel = messageTableModel;
|
this.messageTableModel = messageTableModel;
|
||||||
this.rules = rules;
|
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));
|
this.activeHandler = api.http().registerHttpHandler(new HttpMessageActiveHandler(api, configLoader, messageTableModel));
|
||||||
this.passiveHandler = api.scanner().registerScanCheck(new HttpMessagePassiveHandler(api, configLoader, messageTableModel));
|
if (isProfessionalVersion) {
|
||||||
|
this.passiveHandler = api.scanner().registerScanCheck(new HttpMessagePassiveHandler(api, configLoader, messageTableModel));
|
||||||
|
}
|
||||||
|
|
||||||
initComponents();
|
initComponents();
|
||||||
}
|
}
|
||||||
@@ -379,7 +386,7 @@ public class Config extends JPanel {
|
|||||||
configLoader.setMode(selected ? "true" : "false");
|
configLoader.setMode(selected ? "true" : "false");
|
||||||
|
|
||||||
if (checkBox.isSelected()) {
|
if (checkBox.isSelected()) {
|
||||||
if (passiveHandler.isRegistered()) {
|
if (isProfessionalVersion && passiveHandler.isRegistered()) {
|
||||||
passiveHandler.deregister();
|
passiveHandler.deregister();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -387,7 +394,7 @@ public class Config extends JPanel {
|
|||||||
activeHandler = api.http().registerHttpHandler(new HttpMessageActiveHandler(api, configLoader, messageTableModel));
|
activeHandler = api.http().registerHttpHandler(new HttpMessageActiveHandler(api, configLoader, messageTableModel));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!passiveHandler.isRegistered()) {
|
if (isProfessionalVersion && !passiveHandler.isRegistered()) {
|
||||||
passiveHandler = api.scanner().registerScanCheck(new HttpMessagePassiveHandler(api, configLoader, messageTableModel));
|
passiveHandler = api.scanner().registerScanCheck(new HttpMessagePassiveHandler(api, configLoader, messageTableModel));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user