How to Update myfunction inside Brida.js file to include Context
2024-1-30 19:8:25 Author: www.reddit.com(查看原文) 阅读量:8 收藏

Hello guys, i am new to brida ( The frida tool extension used in burpsuite ) and i am stuck in the below issue and need some help... I need to fill in "brida.js" file with my custome function to use the same class/method used by my andorid app, but i am stuck in figuring out how to pass in the Context as in my mobile class...

As example; To use "dosomething" method in our Brida.js for the below class

public final class someclass {
    public static String dosomething(String str) {
        // Do something

We do it like this

rpc.exports = { //redacted,
	myfunction: function(message) {
		var ret = "null";
		Java.perform(function () {
			var x = Java.use("someclass");
			var x = someclass.dosomething(message);
			ret = x;
		});
	return ret;
	}
}     

But how we do it if our method has a Context that need to be passed as in the below class?

public final class someclass {
    public static String dosomethingelse(String str, Context context) {
        // Do something else        

i have tried to add both arguments "this" and "Context" to my function but couldn't get the correct returned value.


文章来源: https://www.reddit.com/r/ReverseEngineering/comments/1aelyj3/how_to_update_myfunction_inside_bridajs_file_to/
如有侵权请联系:admin#unsafe.sh