3 Commits

Author SHA1 Message Date
MoonLeeeaf
05f2d3915c chore: better toast
Some checks failed
Android CI / build (push) Failing after 14m58s
2024-06-08 20:57:11 +08:00
MoonLeeeaf
9543727c7a chore: no toasts 2024-06-08 19:16:12 +08:00
MoonLeeeaf
7a529652c5 chore: code 401 -> null 2024-06-08 18:16:23 +08:00
3 changed files with 18 additions and 39 deletions

View File

@@ -1,50 +1,20 @@
{
"allFiles": [
{
"file": "/storage/emulated/0/铃芽の文件/Projects/FuckMaoNemo/app/src/main/res/xml/config.xml",
"selection": {
"end": {
"column": 7,
"index": 1062,
"line": 30
},
"start": {
"column": 7,
"index": 1062,
"line": 30
}
}
},
{
"file": "/storage/emulated/0/铃芽の文件/Projects/FuckMaoNemo/app/src/main/java/io/github/moonleeeaf/fuckmaonemo/Hook.java",
"selection": {
"end": {
"column": 31,
"index": 5591,
"line": 138
"column": 51,
"index": 3944,
"line": 90
},
"start": {
"column": 31,
"index": 5591,
"line": 138
}
}
},
{
"file": "/storage/emulated/0/铃芽の文件/Projects/FuckMaoNemo/app/build.gradle",
"selection": {
"end": {
"column": 23,
"index": 273,
"line": 14
},
"start": {
"column": 23,
"index": 273,
"line": 14
"column": 51,
"index": 3944,
"line": 90
}
}
}
],
"selectedFile": "/storage/emulated/0/铃芽の文件/Projects/FuckMaoNemo/app/build.gradle"
"selectedFile": "/storage/emulated/0/铃芽の文件/Projects/FuckMaoNemo/app/src/main/java/io/github/moonleeeaf/fuckmaonemo/Hook.java"
}

View File

@@ -81,7 +81,16 @@ public class Hook implements IXposedHookLoadPackage {
Object rawRes = XposedHelpers.getObjectField(res, "rawResponse");
XposedHelpers.setIntField(rawRes, "code", 200);
XposedBridge.log("[FuckMaoNemo] 拦截响应 " + code + "");
String t = "服务端返回响应码 " + code;
String t = "响应码 " + code;
switch (code) {
case 401:
t = "已阻止异常登出";
break;
case 405:
case 422:
t = "API 访问被拒绝,评论区或者已封禁账号?";
break;
}
Toast.makeText(getApplication(), "[FuckMaoNemo] " + t, Toast.LENGTH_SHORT).show();
}
}

View File

@@ -17,7 +17,7 @@
<SwitchPreference
android:key="fuck_40x"
android:title="阻止服务端响应 40x 码"
android:summary="启用此开关后,将可以:\n拦截 401 码强制登出账号\n强制浏览已封禁账号的资料卡\n评论接口检测\n其他作用" />
android:summary="启用此开关后,将可以:\n拦截 401 码强制登出账号\n强制浏览已封禁账号的资料卡\n评论接口检测\n其他作用\n现在不再弹出 Toast 提示" />
<SwitchPreference
android:key="no_records"