Skip to content

Commit

Permalink
Fix bug in uninstall_plugin script
Browse files Browse the repository at this point in the history
  • Loading branch information
dc3-tsd committed Feb 1, 2024
1 parent 439e112 commit 71e3150
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## [1.0.0] - 2024-01-30
- Fixed #21, #31 and #34.
- Phidra launcher will no longer terminate Python if a fatal exception occurs when launching, except in GUI mode.
- Pyhidra launcher will no longer terminate Python if a fatal exception occurs when launching, except in GUI mode.
- Adds `this` variable to Python scripts to mirror Ghidra's builtin Python script behavior.
- Plugins are now compiled targeting JDK 17.
- Fixed deprecation warning when compiling plugin.
Expand Down
2 changes: 2 additions & 0 deletions pyhidra/install_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

import argparse
from pathlib import Path
import logging

import pyhidra


if __name__ == "__main__":
logging.basicConfig(level=logging.INFO, format="%(message)s")
# spin everything up to ensure all new plugins are installed and exit
parser = argparse.ArgumentParser("Install Ghidra Plugins")
parser.add_argument(
Expand Down
5 changes: 4 additions & 1 deletion pyhidra/uninstall_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

import argparse
from pathlib import Path
import logging

import pyhidra


if __name__ == "__main__":
logging.basicConfig(level=logging.INFO, format="%(message)s")
parser = argparse.ArgumentParser("Uninstall Ghidra Plugin")
parser.add_argument(
"PLUGIN_NAME",
Expand All @@ -26,7 +28,8 @@
args = parser.parse_args()

plugin_name = args.PLUGIN_NAME
launcher = pyhidra.HeadlessPyhidraLauncher(install_dir=args.install_dir)
launcher = pyhidra.DeferredPyhidraLauncher(install_dir=args.install_dir)
launcher.start()
install_path = launcher.get_install_path(plugin_name)
if install_path.exists():
launcher.uninstall_plugin(plugin_name)
Expand Down

0 comments on commit 71e3150

Please sign in to comment.