0

With Frida, I know how to write to console.log like:

console.log('TARGETED_METHOD_CALLED');

But how can I write to a file?

5
  • frida.re/docs/javascript-api/#file
    – 0xec
    Nov 21 '21 at 23:03
  • @0xec I have tried f = new File("/tmp/logger", "wb") But I got error Error: failed to open file (No such file or directory) (even this file really exist) I want this logger file will be into my ubuntu , not into android ,yes?
    – frida
    Nov 22 '21 at 6:38
  • Are you using Frida on a samartphone (iOS/Android) or an local application? If you use it for a smartphone then the question is where do you want to write the file on the smartphone or on the connected PC?
    – Robert
    Nov 22 '21 at 12:25
  • @Robert I use frida-server into Android and frida in Ubuntu , I want to save the logger file into my Ubuntu
    – frida
    Nov 22 '21 at 12:29
  • 1
    Please edit your question and add this important info + tagging. Then you can't do this in frida JavaScript as the JS code is executed on Android side. You can only use send() on client side but the you have to implement python code on server side to handle those sent messages.
    – Robert
    Nov 22 '21 at 12:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.