n/nodeloc-appu/lezi-fun · 2 个月前
注册 登录
n/nodeloc-app · 2 个月前 · 648 次浏览
u/lezi-fun钻石

趁着James不在,偷偷发一点东西

NodeLoc 设备信息显示功能分析报告

📅 日期

2026-08-30

🎯 目标

实现 NodeLoc APP 发帖时显示设备信息的功能(如"来自 Pixel 8 Pro")

🔍 逆向分析结果

1. 官方 APK 反编译发现

通过反编译官方 APK,在 defpackage/y6.java 中找到关键代码:

// 第 389-409 行
int iIntValue = ((Number) obj).intValue();
if (iIntValue <= 0) {
    return c91.m;
}

LinkedHashMap linkedHashMapD0 = gn2.d0(new ce3("mobile_source_platform", "android"));

if (iIntValue >= 3) {
    String strA = ow0.a();  // 获取品牌
    if (strA.length() <= 0) {
        strA = null;
    }
    if (strA != null) {
        linkedHashMapD0.put("mobile_source_brand", strA);
    }
}

if (iIntValue < 4) {
    return linkedHashMapD0;
}

String str = Build.MODEL;
if (str == null) {
    str = "";
}
String string = jq4.z0(str).toString();
String str2 = string.length() > 0 ? string : null;
if (str2 != null) {
    linkedHashMapD0.put("mobile_source_model", str2);
}

2. 发帖请求参数

根据用户设置的 post_source_level,在发帖时添加以下字段到请求 body:

Level 字段 值 说明
1+ mobile_source_platform "android" 平台标识
3+ mobile_source_brand 品牌名(如 "Google") 设备品牌
4+ mobile_source_model 型号(如 "Pixel 8 Pro") 设备型号

3. 品牌获取逻辑

在 defpackage/ow0.java 中实现:

public static String a() {
    // 优先从系统属性获取市场名称
    String strB = b();  // 读取系统属性
    
    // 特定子品牌列表
    Set<String> subBrands = {"iqoo", "redmi", "poco", "realme", "honor", "nothing"};
    
    // 如果市场名称是子品牌,使用它
    if (strB != null) {
        String normalized = strB.trim().replace(" ", "").toLowerCase();
        if (subBrands.contains(normalized)) {
            return normalized;
        }
    }
    
    // 否则使用 Build.MANUFACTURER
    return Build.MANUFACTURER.trim();
}

public static String b() {
    // 按优先级尝试读取系统属性
    String[] properties = {
        "ro.vivo.market.name",
        "ro.product.marketname",
        "ro.config.marketing_name",
        "ro.vendor.oplus.market.name",
        "ro.oppo.market.name",
        "ro.product.vendor.marketname"
    };
    
    // 通过反射调用 SystemProperties.get()
    for (String prop : properties) {
        String value = SystemProperties.get(prop);
        if (value != null && !value.isEmpty()) {
            return value;
        }
    }
    return null;
}

4. Web 页面显示方式

通过 Playwright 浏览器测试 https://6waed6lo6phn6.pages.dev/t/topic/105674/32 发现:

HTML 结构:

<span class="mobile-source">
    <span class="mobile-source__badge" title="本帖由 lezi-fun 使用 Pixel 8 Pro 发送。">
        Pixel 8 Pro
    </span>
</span>

显示文本:

  • 完整提示:"本帖由 lezi-fun 使用 Pixel 8 Pro 发送。"
  • 显示文本:"Pixel 8 Pro"

🧪 测试结果

测试方式

curl -X POST "$BASE_URL/posts" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -H "X-CSRF-Token: $CSRF_TOKEN" \
  -H "User-Agent: Mozilla/5.0 (Linux; Android 14; Pixel 8 Pro) ..." \
  --data-urlencode "topic_id=105674" \
  --data-urlencode "raw=测试消息" \
  --data-urlencode "mobile_source_platform=android" \
  --data-urlencode "mobile_source_brand=Google" \
  --data-urlencode "mobile_source_model=Pixel 8 Pro"

测试结果

✅ 成功! 在 Web 页面 https://6waed6lo6phn6.pages.dev/t/topic/105674/32 可以看到设备信息显示为 "Pixel 8 Pro"

📚 参考资料

8
30
登录后参与讨论。
u/udc2b6nr 广告
QuicksilverVPN

快银 VPN,一键连接全球节点,线路稳定、延迟低。支持 Windows、macOS 等多平台,TUN 全局模式覆盖全部应用流量。无需复杂配置,下载即用。

umami.dnsl.top 了解更多

30 条回复

排序
  1. gubhost 钻石 钻石会员 2 个月前

    6牛逼 :ac32:

    1
  2. James 💯 传奇 MANAGER 2 个月前

    :ac09:

    1
  3. lezi-fun 钻石 楼主 水王 2 个月前

    我错了(

    0
  4. z8nxa 铂金 2 个月前

    :ac01:

    0
  5. AlaricMadis 白银 2 个月前

    :xhj007:

    0
  6. lezi-fun 钻石 楼主 水王 2 个月前

    不如把

    /topics/timings
    

    也公开了(

    0
  7. Mike-Leone 无双 指导顾问 2 个月前

    @James 我能篡改客户端吗,直接把设备改成NodeLoc
    :xhj001:

    1
  8. Serendipity1 钻石 2 个月前

    牛掰的

    1
  9. gubhost 钻石 钻石会员 2 个月前

    好像已经在实验了

    0
  10. lezi-fun 钻石 楼主 水王 2 个月前

    完了...

    0
  11. gubhost 钻石 钻石会员 2 个月前

    哈哈哈哈

    0
  12. gubhost 钻石 钻石会员 2 个月前
    2
  13. ifu08 黄金 2 个月前

    笑死了 :ac16:

    0
  14. coder1 黄金 2 个月前

    :xhj003:

    0
  15. tast 黄金 2 个月前

    潜入后宫,兴风作浪! :ac01:

    0
  16. mantue 黄金 3 YEARS 2 个月前

    是大佬

    0
  17. 9417vip 💬 白银 2 个月前

    最终还是app暴露了弱点。。。

    0
  18. chenshui 黄金 2 个月前

    好活

    0
  19. doudou1 黄金 2 个月前

    :xhj16:

    0
  20. lukaluka 黄金 2 个月前

    :xhj25:

    0
  21. user94 富可敌国 钻石 2 个月前

    感谢

    0
  22. lezi-fun 钻石 楼主 水王 2 个月前

    e

    0
  23. kinghost 富可敌国 黄金 2 个月前

    James来了,大家快跑啊

    0
  24. Struhaqi 黄金 2 个月前

    来瞧瞧 :xhj002:

    0
  25. qeity 铂金 3 YEARS 2 个月前

    感谢佬友的Android逆向分析

    0
  26. qeity 铂金 3 YEARS 2 个月前

    11

    0
  27. duyouqian 白银 2 个月前

    我也来尝尝咸淡 :ac32:

    0
  28. NoeTes 黄金 2 个月前

    我来康康

    0
  29. keioio 白银 3 YEARS 2 个月前

    逆向始终不太好

    0
  30. yorushika 钻石 2 个月前

    小坏蛋

    0