forked from Thehepta/FGum
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpc transfer js to FridaGpcServiceImp
- Loading branch information
thehepta
committed
May 24, 2024
1 parent
c950c43
commit 902caad
Showing
11 changed files
with
280 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
function main() { | ||
Java.perform(function () { | ||
|
||
Java.enumerateClassLoaders({ | ||
onMatch: function(loader) { | ||
let msg = `[loader]:${loader}`; | ||
console.log(msg); | ||
Java.use("com.test.fgum.MainActivity").update_text(msg); | ||
}, | ||
onComplete: function() { | ||
let msg = `find loader end`; | ||
console.log(msg); | ||
Java.use("com.test.fgum.MainActivity").update_text(msg); | ||
} | ||
}); | ||
|
||
var i = 0; | ||
var timer = setInterval(function () { | ||
console.log(i++); | ||
},1000) | ||
}) | ||
} | ||
|
||
setImmediate(main); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
function main() { | ||
|
||
// hook 所有 View 的点击事件 | ||
Java.perform(function () { | ||
var View = Java.use('android.view.View'); | ||
var OnClickListener = Java.use('android.view.View$OnClickListener'); | ||
|
||
// hook View 的 setOnClickListener 方法 | ||
View.setOnClickListener.implementation = function (listener) { | ||
this.setOnClickListener(OnClickListener.$new({ | ||
onClick: function (view) { | ||
// 按钮被点击时执行的代码 | ||
console.log('Button was clicked!'); | ||
// 调用原始方法以确保按钮的点击事件仍然被处理 | ||
listener.onClick(view); | ||
} | ||
})); | ||
}; | ||
}); | ||
} | ||
|
||
setImmediate(main); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.