????Hook ?? API
????????? hook ?Щ??е??? API?????????????????????????????Щ????????
????????? HTTP ?????е? payload?? startActivity() ?д???? Intent?????????????????????
XposedHelpers.findAndHookConstructor("java.net.URL"?? loadPackageParam.classLoader?? String.class?? new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
String url = (String) param.args[0];
log("URL construct " + url);
/* ?????????????????????????????? */
param.args[0] = "http://www.baidu.com/";
log("Change URL to " + param.args[0]);
}
});
???????????????
?????????? Exception ????????÷?????????????????????????????????????????????????????????λ??????????????????????ù???????????????????а?????
XposedHelpers.findAndHookConstructor("java.net.URL"?? loadPackageParam.classLoader?? String.class?? new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
/* ??????????????? */
new Exception("new URL").printStackTrace();
/* ????? Xposed ??? */
XposedBridge.log(new Exception("new URL"));
}
});
????Hook ?????
??????????й????в??????????????????Щ????????????Щ?????????????????? log ?????????????????????? Xposed ?? hook ?????????????????????????Java ?????????????????????????????????????????????????????????????????????? hook ?????????????????????????磺
XposedBridge.hookAllConstructors(IOException.class?? new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
/* ???????? IO?????? IO ?? IO ?????????? */
XposedBridge.log((Throwable) param.thisObject);
}
});
??????
????????????????????????????????в??????????????????