-
Notifications
You must be signed in to change notification settings - Fork 9
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
Support starting the jupyter without Ghidra GUI. #32
Comments
Mmh, none that I have setup yet, but in theory it should be quite possible. You can simply call |
Thanks! @fmagin
This is exactly what I'm trying to do. |
Okay, quickly gave this a try: The first issue is that the But when I change the
@tmr232 you built the Notebook proxy, what do you think is the best way to allow this to work both in the GUI and from a script in headless mode? I'm quite confused why this logging class error only happens sometimes, I guess there are some kind of incompatible libraries involved here. Script: import GhidraJupyterKotlin.CellContext
import GhidraJupyterKotlin.NotebookProxy
import ghidra.app.script.GhidraScript
import ghidra.util.Msg
import ghidra.util.task.DummyCancellableTaskMonitor
import org.jetbrains.kotlinx.jupyter.embedKernel
import org.jetbrains.kotlinx.jupyter.libraries.EmptyResolutionInfoProvider
import java.nio.file.Path
import java.util.*
class HeadlessNotebook : GhidraScript() {
override fun run() {
val proxyPath = Path.of(
Optional.ofNullable(System.getenv("GHIDRA_JUPYTER_PROXY"))
.orElse(
Path.of(System.getProperty("user.home"))
.resolve(".ghidra")
.resolve("notebook_proxy")
.toString()
)
)
val connectionFile = NotebookProxy(proxyPath).waitForConnection(DummyCancellableTaskMonitor())
Msg.info(this, connectionFile.toString())
embedKernel(
connectionFile,
EmptyResolutionInfoProvider, listOf<CellContext>(CellContext(this))
)
}
} |
Is there a way to run a kotlin jupyter notebook without starting the Ghidra GUI? That would be helpful when developing scripts on a server.
The text was updated successfully, but these errors were encountered: