Skip to content
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

How to load script and exit frida environment after removing --no-pause? #122

Closed
StackOverflowExcept1on opened this issue Oct 16, 2022 · 2 comments

Comments

@StackOverflowExcept1on
Copy link

StackOverflowExcept1on commented Oct 16, 2022

--no-pause behaviour was changed in a557bfe

hello.c

#include <stdio.h>
#include <unistd.h>

void
f (int n)
{
  printf ("Number: %d\n", n);
}

int
main (int argc,
      char * argv[])
{
  int i = 0;

  printf ("f() is at %p\n", f);

  while (1)
  {
    f (i++);
    sleep (1);
  }
}

$ gcc -Wall hello.c -o hello

hello.js

Interceptor.attach(ptr("0x55c9f407e169"), {
    onEnter(args) {
        args[0] = ptr("1337");
    }
})
./hello
f() is at 0x55c9f407e169
Number: 0
Number: 1
Number: 2
Number: 3
Number: 4
Number: 5
# since frida 16 --no-pause removed :(
frida hello -l hello.js

     ____
    / _  |   Frida 16.0.1 - A world-class dynamic instrumentation toolkit
   | (_| |
    > _  |   Commands:
   /_/ |_|       help      -> Displays the help system
   . . . .       object?   -> Display information about 'object'
   . . . .       exit/quit -> Exit
   . . . .
   . . . .   More info at https://frida.re/docs/home/
   . . . .
   . . . .   Connected to Local System (id=local)

[Local::hello ]->

Is there any way to exit from [Local::hello ]-> after script loaded?

@StackOverflowExcept1on
Copy link
Author

For example I want to use frida --load injector.js with Module.load(...) and exit from js script after performing stuff. It seems to me that this used to work with --load --no-pause

@StackOverflowExcept1on
Copy link
Author

Whoops, it can be done via -q flag

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

No branches or pull requests

1 participant