Skip to content

Move output to /tmp/#32

Draft
JayFoxRox wants to merge 1 commit intocesena:masterfrom
JayFoxRox:tmp-output
Draft

Move output to /tmp/#32
JayFoxRox wants to merge 1 commit intocesena:masterfrom
JayFoxRox:tmp-output

Conversation

@JayFoxRox
Copy link
Copy Markdown

This is merely a feature proposal.

Ideally the user could control the output path.

In my case, I mount disk images and analyze/decompile files in those.
These disks are typically read-only, so writing the file to the exe_path will fail.

My workaround is to move it to /tmp/ which works fine on Linux and macOS.

@nneonneo
Copy link
Copy Markdown
Contributor

nneonneo commented Jan 9, 2026

In the long run I think what I'd rather do is have it so that the script prompts you the first time it's run for an output path (defaulting to the input path), and subsequently caches that path for future invocations. Alternatively, for your use case, something like an os.access(out_path, os.W_OK) test, followed by a prompt if the output path isn't writable, would be a cleaner solution than just unconditionally sticking things in /tmp.

@JayFoxRox
Copy link
Copy Markdown
Author

Yes, fully agree.

and subsequently caches that path for future invocation

Yes, a combined solution which also solves #31 would be ideal.

I think it could be like the Ghidra "Export Program" which has a small GUI for the path and checkboxes for different features in the exported files:

Screenshot_20260110_095442

(Obviously it should remember all of this)

Maybe even a "do-not-show this dialogue again"-option and another way to trigger the dialogue, because I actually re-export my files very often while improving symbols (which is also why #31 became necessary).

os.access(out_path, os.W_OK) test

I think catching the error is probably better than just testing W_OK as there could be TOCTOU issues with a separate check.

would be a cleaner solution than just unconditionally sticking things in /tmp.

Yes, it's a horrible solution.
My draft PRs are merely documenting the hacks I had to do to be able to be able to make the plugin usable for me.
In this instance, dumping to /tmp was the easiest solution that works for me.
I could have created GitHub issues instead, but then people (including me in the future) would have to come up with their own workarounds, so I figured showing my hacks explain the problems better (and might nerd-snipe someone).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants