-
Notifications
You must be signed in to change notification settings - Fork 65
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
spawn java.exe on Windows not working #2
Comments
Interesting. Does it work with any other applications? Did you try this use-case with the python binding by any chance? (I'm curious if it's a frida-node bug or deeper in the stack.) |
I've tried with I didn't try with python. I'll try it later. |
Ok! I wonder if there's something wrong with how we construct the argument list. |
it has the same issue with python: import frida
import os
# NB python 3.3+ already has a shutil.which function. we somewhat emulate it here.
def which(binary):
extensions = os.getenv("PATHEXT", "").split(os.pathsep)
for p in os.environ["PATH"].split(os.pathsep):
path = os.path.join(p, binary)
for extension in extensions:
p = os.path.abspath(path + extension)
if os.path.isfile(p) and os.access(p, os.X_OK):
return p
return None
JAVA_PATH = which("java")
args = [JAVA_PATH, "-jar", "Program.jar"]
# this works fine:
#os.spawnv(os.P_WAIT, JAVA_PATH, args)
pid = frida.spawn(args)
frida.resume(pid) EDIT I've added the |
Aha, nice. Clearly a bug in frida-core then. I'll have a look at it before the upcoming release. Thanks! |
Fixed by frida/frida-core@2ff867f. Thanks for reporting! |
I'm trying to spawn a java application on Windows, but its not working even with an hello world created like:
The node script is:
It will error out with:
The text was updated successfully, but these errors were encountered: