Skip to content

Commit

Permalink
修复 HaE 安装状态检测不严谨,导致路径失效后无法重新选择 HaE 路径的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
vaycore committed Jan 2, 2024
1 parent b5a71d3 commit e308711
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions src/main/java/burp/vaycore/hae/HaE.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ public static void loadPlugin(String pluginPath, LoadPluginCallback callback) {
* @return true=卸载成功;false=卸载失败
*/
public static boolean unloadPlugin() {
// 是否初始化
if (sExtender == null || sCallbacks == null || sAdapter == null) {
// 是否已安装插件
if (!hasInstall()) {
return false;
}
try {
Expand All @@ -135,6 +135,15 @@ public static boolean unloadPlugin() {
}
}

/**
* 是否安装插件
*
* @return true=已安装;false=未安装
*/
public static boolean hasInstall() {
return sExtender != null && sCallbacks != null && sAdapter != null;
}

public static void processHttpMessage(IHttpRequestResponse messageInfo) {
if (sHttpListener != null) {
byte[] response = messageInfo.getResponse();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void actionPerformed(ActionEvent e) {
switch (action) {
case "hae-plugin-select-file":
oldPath = getHaEPluginPath();
if (StringUtils.isNotEmpty(oldPath)) {
if (HaE.hasInstall()) {
UIHelper.showTipsDialog("HaE plugin already loaded.");
return;
}
Expand Down

0 comments on commit e308711

Please sign in to comment.