闲鱼
function hookNetwork(){
console.log("start hook ......")
//抓包
var SwitchConfig = Java.use('mtopsdk.mtop.global.SwitchConfig')
SwitchConfig.A.implementation = function(){
console.log("AA")
return false
}
SwitchConfig.z.implementation = function(){
console.log("zz")
return false
}
// root检测
var cls2 = Java.use('com.mobile.auth.gatewayauth.utils.security.CheckRoot');
var mhd_array = cls2.class.getDeclaredMethods();
cls2.checkRootPathSU.implementation = function(){
var result = this.checkRootPathSU();
console.log("checkRootPathSU:"+result)
return false
}
// xposed检测
var cls3 = Java.use('com.mobile.auth.gatewayauth.utils.security.CheckHook')
cls3.isHookByStack.implementation = function(){
var result = this.isHookByStack();
console.log("isHookByStack:"+result)
return false
}
cls3.isHookByJar.implementation = function(){
var result = this.isHookByJar();
console.log("isHookByJar:"+result)
return false
}
}
Java.perform(function () {
hookNetwork();
});
淘宝、淘特
function hookNetwork(){
var enableSpdy = false;
var SwitchConfig = Java.use('mtopsdk.mtop.global.SwitchConfig')
var instance = SwitchConfig.getInstance();
instance.setGlobalSpdySslSwitchOpen(enableSpdy);
instance.setGlobalSpdySwitchOpen(enableSpdy);
}
Java.perform(function () {
hookNetwork();
});