-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
b.bridge.remote_shutdown() starting server of different programs #51
Comments
Hi, Tyler, I'm unable to reproduce this problem based on your description. I'll note that ghidra_bridge has no control over the headless analysis restarting - my guess would be that the most likely issue is something to do with the command you're using to run the analyzeHeadless script. If you can provide the commands you're using to run analyzeHeadless and the bridge, I can attempt to reproduce the problem to see if it is in fact related to ghidra_bridge. |
libinou is my binary name |
@justfoxing On a side note, is there anyway i can integrate that command above into a shell script? Something like |
Yeah, this isn't a ghidra_bridge problem, your command as written is incorrect. The problem is with this part: If you look at the documentation for analyzeHeadless (as mentioned in the response to your previous issue), you will see that -import can take multiple arguments to import, and that these can be either files or directories. If you import a directory, it will attempt to import every file it finds in that directory. Because you have analyzeHeadless is complex - I really recommend you take the time to read the documentation and play around with it without ghidra_bridge in the mix to understand how it works. As always, hit up the ghidra project for support with it. |
WRT your second question, here's the relevant lines in the automated test system for this project: /opt/ghidra/support/analyzeHeadless /tmp TestProject -import /bin/bash -noanalysis -scriptPath /tmp/ghidra_bridge/test_server -preScript ghidra_bridge_server.py >/tmp/script.log 2>/tmp/script.err & # Run the ghidra_bridge_server in a headless ghidra - we use non-background server, otherwise the script would exit before we could test
( tail -f /tmp/script.err & ) | grep -q "_bridge.bridge:serving!" # pause until we see the ghidra_bridge_server start logging messages
python3 -c "import ghidra_bridge; b = ghidra_bridge.GhidraBridge(namespace=globals()); print(getState().getCurrentAddress())" # run a quick test for ghidra_bridge - we do this before nose, because the last nose test shuts down the bridge The trickiest part is waiting until the bridge server has been started before attempting to connect to it, which is what the tail/grep combo provides. |
whenever i have b.bridge.remote_shutdown() it always ends the headless server of this current program, but then instantly just launches headless of another program (sometimes the exact same program, sometimes random). It is really annoying and usually is hard to truly end. Is there any way to fix this problem
The text was updated successfully, but these errors were encountered: