Skip to content

There is any way to access instance variable within a hooked method ? #8

Description

@GuilhermeFM

There is any way to access instance variable within a hooked method ?

Java class Example:

public class TestClass {
      public int a;
      private int c;
      protected int d;

      public void methodTest() {
            ......
      }
}

Javacript Hooker:

if (Java.available) {
	Java.perform(function () {
        var module = Java.use("com.package.TestClass");
        module.TesteClass.implementation = function() {
        	send("vars => " + this.a + " " + this.b + " " + this.d );	
        };   
    });
}
else {
	send("Not ready")
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions