dod-cyber-crime-center / pyhidra

Pyhidra is a Python library that provides direct access to the Ghidra API within a native CPython interpreter using jpype.
Other
153 stars 14 forks source link

Subprocess treats whole command as single file #1

Closed lacraig2 closed 2 years ago

lacraig2 commented 2 years ago

On non-Windows machines subprocess.check_output treats the entire command as a single file.

https://github.com/Defense-Cyber-Crime-Center/pyhidra/blob/c487e4d39445d836e8626aacc65f206f127ab063/pyhidra/launcher.py#L131-L133

It produces the following error:

[Errno 2] No such file or directory: 'java -cp "/Applications/Ghidra.app/ghidra/support/LaunchSupport.jar" LaunchSupport "/Applications/Ghidra.app/ghidra" -jdk_home -save': 'java -cp "/Applications/Ghidra.app/ghidra/support/LaunchSupport.jar" LaunchSupport "/Applications/Ghidra.app/ghidra" -jdk_home -save'

Target: OSX 11.6.4, Python 3.7.6, Ghidra 10.2 DEV