Git Product home page Git Product logo

Comments (6)

oleavr avatar oleavr commented on June 21, 2024

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.)

from frida-node.

rgl avatar rgl commented on June 21, 2024

I've tried with cat, echo, just java.exe (without arguments) and it works. But, it seems something odd happens when arguments are passed to java.exe.

I didn't try with python. I'll try it later.

from frida-node.

oleavr avatar oleavr commented on June 21, 2024

Ok! I wonder if there's something wrong with how we construct the argument list.

from frida-node.

rgl avatar rgl commented on June 21, 2024

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 os.spawnv call.

from frida-node.

oleavr avatar oleavr commented on June 21, 2024

Aha, nice. Clearly a bug in frida-core then. I'll have a look at it before the upcoming release. Thanks!

from frida-node.

oleavr avatar oleavr commented on June 21, 2024

Fixed by frida/frida-core@2ff867f. Thanks for reporting!

from frida-node.

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.