Code Monkey home page Code Monkey logo

Comments (3)

federicodotta avatar federicodotta commented on July 4, 2024 1

Hi sieunhando,

when you define an export, you don't have to overload the method. For example, in your situation:

rpc.exports = {
  tokenfunc: function () {
    Java.perform(function() {
      var es_class = Java.use("es");
      return es_class.b();
    });
  }
}

Addictionally:

  1. Check if your function (tokenfunc) is inside the rpc.export section
  2. On the BAppStore there was a wrong (old) version of Brida. Now there is the correct (new) version of Brida. Try to delete Brida and re-download it from BAppStore
  3. If you edit the JavaScript file after launching the application with Brida, you have to reload the JS file using "Reload JS" button on Brida

Let me know if this solve your problem.

Federico

from brida.

abdilahrf avatar abdilahrf commented on July 4, 2024

rpc.exports = {
tokenfunc: function () {
Java.perform(function() {
var es_class = Java.use("es");
return es_class.b();
});
}
}

@federicodotta we cannot export that function like that, the returned value is not correct

rpc.exports = {
  tokenfunc: function () {
    Java.perform(function() {
     var es_class = Java.use("es");
     return es_class.b(); // this is not returned to the tokenfunc function
    });
  return "TEST" ; // this is what returned to tokenfunc function how we able to make the return to here
 }
}

I tried this doesnt work too ...

rpc.exports = {
  tokenfunc: function () {
    var ret_val = "DEFAULT";
    Java.perform(function() {
     var es_class = Java.use("es");
     ret_val = es_class.b(); // this is not returned to the tokenfunc function
    });
  return ret_val ; // this is what returned to tokenfunc function how we able to make the return to here
 }
}

from brida.

federicodotta avatar federicodotta commented on July 4, 2024

Hi abdilahrf,

I think that your problem may be caused by the fact that Java.perform is potentially asynchronous. Please refer to this frida issue and let me know if it solves your problem!

Federico

from brida.

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.