硕士生
 
- 金币
- 2062
- 好评
- 22
- 信誉
- 105
|
发表于
2026-5-15 00:22:42
来自手机
|
显示全部楼层
来自 四川
本帖最后由 hw1020 于 2026-5-15 03:37 编辑
内置frida脚本,hook即可,xposed也行。
frida脚本如下。
- Java.perform(function () {
- var OkioBuffer = Java.use("okio.Buffer");
- var StringClass = Java.use("java.lang.String");
- console.log("[*] Intercepting okio.Buffer to bypass card validation...");
- // Hook the exact readString method signature
- // Original Java: public String readString(long byteCount, Charset charset)
- // Based on decompiled patterns, checking common overloads:
-
- // Attempt 1: Overload with long and Charset (Most common in Okio)
- try {
- OkioBuffer.readString.overload('long', 'java.nio.charset.Charset').implementation = function (byteCount, charset) {
- var originalResult = this.readString(byteCount, charset);
- return handleNetworkString(originalResult, this);
- };
- } catch(e) {
- console.log("[-] Overload (long, Charset) not matched, testing alternatives...");
- }
- // Attempt 2: Fallback overload without arguments if heavily obfuscated/customised
- try {
- OkioBuffer.readString.overload().implementation = function () {
- var originalResult = this.readString();
- return handleNetworkString(originalResult, this);
- };
- } catch(e) {
- console.log("[-] Default overload not matched.");
- }
- // Core String Modification Handler
- function handleNetworkString(originalStr, bufferInstance) {
- if (originalStr != null) {
- var rawText = originalStr.toString();
- // Detect the failed authentication response
- if (rawText.indexOf("卡密不存在") !== -1 || rawText.indexOf('"ok":false') !== -1) {
- console.log("[★ Auth Attempt Intercepted]");
- console.log("[>] Original Server Reply: " + rawText);
- // Define the mock success payload
- // Usually changing ok to true, and appending dummy data or an empty message is enough
- var spoofedResponse = '{"msg":"激活成功","ok":true,"data":{"expires_at":"2099-12-31"}}';
-
- console.log("[√] Spoofing response to : " + spoofedResponse);
- return StringClass.$new(spoofedResponse);
- }
- }
- return originalStr;
- }
- });
复制代码
hkp xposed模块版本
https://www.123pan.com/s/dAheVv-LGaS3.html 提取码:fztc
随便输入验证一下就行。
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
-
查看全部评分
总评分:好评 +1
金币 +1
|