Git Product home page Git Product logo

Comments (3)

justfoxing avatar justfoxing commented on July 20, 2024

So, you've got two options (now).

Either you can create your bridge with a specific response_timeout value in seconds (e.g., b = ghidra_bridge.GhidraBridge(namespace=globals(), response_timeout=<value>)) to control the timeout for every command in the script, or you can use remote_eval with the timeout_override argument to just affect the one command (e.g., b.bridge.remote_eval("analyze(currentProgram)", timeout_override=<value>)).

Like you suggest, analyze() can take arbitrarily long based on program size, so I've just added functionality in jfx_bridge version 0.3.3 (the RPC package ghidra_bridge is built on), so you can specify -1 for the response_timeout/timeout_override values. This will disable the timeout and cause the bridge to wait forever until it gets a response.

You'll need to make sure you've updated jfx_bridge in your client environment (you don't need to update the code on the Ghidra side for this to work), so do pip install jfx_bridge --upgrade and make sure you've got version 0.3.3.

As a side note, I noticed analyze() behave a little weirdly as I was testing, just mentioning so it doesn't catch you out: The first call to analyze() will block until analysis is complete as you expect, but if you call it again without saving the changes or closing and re-opening the program, calling analyze() will start the analysis, but return immediately before it finishes. No idea why, #justGhidraThings.

from ghidra_bridge.

TylerKann avatar TylerKann commented on July 20, 2024

Yeah that analyze behavior is quite frustrating

from ghidra_bridge.

TylerKann avatar TylerKann commented on July 20, 2024

Thanks a lot for the -1 update

from ghidra_bridge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.