ksjsb/core
2026-07-30 20:25:56 +08:00
..
__init__.py chore: initialize repository 2026-07-30 20:25:56 +08:00
atlas_sign.py chore: initialize repository 2026-07-30 20:25:56 +08:00
captcha_assist.py chore: initialize repository 2026-07-30 20:25:56 +08:00
captured_profile.py chore: initialize repository 2026-07-30 20:25:56 +08:00
constants.py chore: initialize repository 2026-07-30 20:25:56 +08:00
device_cookie.py chore: initialize repository 2026-07-30 20:25:56 +08:00
device_id.py chore: initialize repository 2026-07-30 20:25:56 +08:00
device_profile.py chore: initialize repository 2026-07-30 20:25:56 +08:00
dfp_cache.py chore: initialize repository 2026-07-30 20:25:56 +08:00
dfp_client.py chore: initialize repository 2026-07-30 20:25:56 +08:00
dfp_forms.py chore: initialize repository 2026-07-30 20:25:56 +08:00
dfp_knn.py chore: initialize repository 2026-07-30 20:25:56 +08:00
dfp_sign.py chore: initialize repository 2026-07-30 20:25:56 +08:00
dfp_sq0.py chore: initialize repository 2026-07-30 20:25:56 +08:00
enc_data.py chore: initialize repository 2026-07-30 20:25:56 +08:00
fap_request.py chore: initialize repository 2026-07-30 20:25:56 +08:00
h5_jsbridge.py chore: initialize repository 2026-07-30 20:25:56 +08:00
h5_kws_sign.mjs chore: initialize repository 2026-07-30 20:25:56 +08:00
h5_kws_vm.py chore: initialize repository 2026-07-30 20:25:56 +08:00
h5_kws.py chore: initialize repository 2026-07-30 20:25:56 +08:00
h5_kww_alg.py chore: initialize repository 2026-07-30 20:25:56 +08:00
h5_kww_server.mjs chore: initialize repository 2026-07-30 20:25:56 +08:00
h5_kww.py chore: initialize repository 2026-07-30 20:25:56 +08:00
h5_sig3.py chore: initialize repository 2026-07-30 20:25:56 +08:00
h5_vendor_encode_server.mjs chore: initialize repository 2026-07-30 20:25:56 +08:00
h5_vendor_encode.mjs chore: initialize repository 2026-07-30 20:25:56 +08:00
http_transport.py chore: initialize repository 2026-07-30 20:25:56 +08:00
ksse_crc.py chore: initialize repository 2026-07-30 20:25:56 +08:00
ksse_deobf.py chore: initialize repository 2026-07-30 20:25:56 +08:00
ksse_sted.py chore: initialize repository 2026-07-30 20:25:56 +08:00
kwf-0.0.2.2cee19b4b7dec496.js chore: initialize repository 2026-07-30 20:25:56 +08:00
kws-11-0.0.1-obfuscated.5e0a90af726d8a7e.js chore: initialize repository 2026-07-30 20:25:56 +08:00
kwsg.py chore: initialize repository 2026-07-30 20:25:56 +08:00
main-vendor-ox-x1_g5.mjs chore: initialize repository 2026-07-30 20:25:56 +08:00
mobile_encrypt.py chore: initialize repository 2026-07-30 20:25:56 +08:00
privacykit_encrypt.py chore: initialize repository 2026-07-30 20:25:56 +08:00
README.md chore: initialize repository 2026-07-30 20:25:56 +08:00
reward_request.py chore: initialize repository 2026-07-30 20:25:56 +08:00
reward_sign.py chore: initialize repository 2026-07-30 20:25:56 +08:00
sig3_shape.py chore: initialize repository 2026-07-30 20:25:56 +08:00
sig3.py chore: initialize repository 2026-07-30 20:25:56 +08:00
sig.py chore: initialize repository 2026-07-30 20:25:56 +08:00
sms_login.py chore: initialize repository 2026-07-30 20:25:56 +08:00
tokensig.py chore: initialize repository 2026-07-30 20:25:56 +08:00
weapon_d0.py chore: initialize repository 2026-07-30 20:25:56 +08:00
weapon_kas.py chore: initialize repository 2026-07-30 20:25:56 +08:00
weapon_mf.py chore: initialize repository 2026-07-30 20:25:56 +08:00
weapon_plugin_loader.py chore: initialize repository 2026-07-30 20:25:56 +08:00
weapon_vimg.py chore: initialize repository 2026-07-30 20:25:56 +08:00
xfalcon_blake_core.py chore: initialize repository 2026-07-30 20:25:56 +08:00
xfalcon_te.py chore: initialize repository 2026-07-30 20:25:56 +08:00
xfalcon.py chore: initialize repository 2026-07-30 20:25:56 +08:00

core 算法模块

已还原算法按职责拆分到以下入口:

  • core.sig: sig, build_sig_plaintext, body_md5
  • core.tokensig: __NStokensig,调用方显式传入账号的 client_salt
  • core.sig3: KWSG 10418__NS_sig3
  • core.xfalcon: __NS_xfalcon digest / $TE_ / value
  • core.enc_data: KWSG 10400encData / ZT envelope
  • core.atlas_sign: 通用 atlasSign 短 ZT envelope head8 + xor16(24-byte digest)
  • core.reward_sign: reward body sign
  • core.dfp_sign: DFP / unifiedId 的 10405 atlasSign 输入拼接与签名封装
  • core.device_id: Java 层可见的 did / oDid / rdid 本地派生辅助和 egid 格式校验
  • core.constants: 静态算法常量
  • core.captured_profile: 当前抓到的本机/账号样本值

core.kwsg 只作为旧代码兼容聚合层,不再放算法实现。out/* 中的分析 和请求构造脚本优先从 core 分类模块导入。

注意:didoDidrdidegidapi_sttokenClientSalt 都不是通用算法常量。它们与设备、账号或登录态绑定,当前样本放在 core.captured_profile,换账号/设备时应替换 profile。core.device_id 只覆盖 APK Java 层已经定位到的本地派生路径;egid 仍走 DFP/KSecurity 链路,当前不要伪造成简单 hash。

oDid 当前已确认是初始化阶段保留下来的原始本地 DID FoundationInfoInitModule -> deviceid/i.e() -> ss9/a.b,公共参数 q01/g.getODid() 最终读取 ss9.a.b。后续云端刷新 did 时只更新 ss9.a.a,不会覆盖 ss9.a.b

egid 链路当前已拆到:

DFP lite kNN -> sq0.b -> core.enc_data.kwsg_10400_raw(deviceInfo)
DFP form     -> core.dfp_sign.dfp_atlas_sign(sign)

10405 atlasSign 与已还原的 10418 sign 分支共用 innerFlag=true digest 管线;区别主要在输入字符串由 DFP Java builder 决定。core.dfp_sign 固化了 gdfp_reportunified_log_reportunified_id_mappingunified_repair/fetch/checkRepair 的输入拼接规则。