Xpsoed插件开发

占坑,开始填填

Xposed 绕过WIFI代理检测

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

XposedHelpers.findAndHookMethod(cls,
"getProperty", String.class,
new XC_MethodHook() {
protected void afterHookedMethod(
MethodHookParam param)
throws Throwable {
if ("http.proxyHost".equals(String
.valueOf(param.args[0]))) {
param.setResult(null);
}

if ("http.proxyPort".equals(String
.valueOf(param.args[0]))) {
param.setResult(null);
}
};
});

Xposed 绕过简单的证书校验

1
2
3
4
5
6
7
8
9
10
11
12
XposedHelpers.findAndHookMethod("X509TrustManager or TrustManager 实现类",
lpparam.classLoader, "checkServerTrusted",
X509Certificate[].class, String.class,
new XC_MethodReplacement() {
@Override
protected Object replaceHookedMethod(
MethodHookParam methodHookParam)
throws Throwable {
XposedBridge.log("直接替换checkServerTrusted方法(检查证书合法),返回null");
return null;
}
});

谢谢,爱你么么哒