Skip to content

Instantly share code, notes, and snippets.

@PrintNow
Last active February 12, 2026 01:57
Show Gist options
  • Select an option

  • Save PrintNow/9162512744f23f36fe17c5c119521783 to your computer and use it in GitHub Desktop.

Select an option

Save PrintNow/9162512744f23f36fe17c5c119521783 to your computer and use it in GitHub Desktop.
中国移动资费公布专区数据解密调试方法
PixPin_2026-02-12_09-49-41

关键解密逻辑部分:

        _0x39ede6['interceptors']['response']['use'](function(_0x51e98a) {
            var _0x15d26c = _0x51e98a['config'];
            if (_0x15d26c['noLoading'] || (0x0,
            _0x2de9be['Dk'])(),
            0xc8 === _0x51e98a['status'] || 0x130 === _0x51e98a['status']) {
                var _0x4a1e1a = _0x51e98a['data'];
                try {
                    _0x4a1e1a && (_0x4a1e1a = (0x0,
                    _0x17e2c7['yl'])(_0x4a1e1a['body']),
                    _0x4a1e1a = JSON['parse'](_0x4a1e1a),
                    _0x4a1e1a && _0x15d26c['needHeaders'] && (_0x4a1e1a['headers'] = _0x51e98a['headers']),
                    (0x0,
                    _0x44fde0['R$'])(_0x4a1e1a));
                } catch (_0x123614) {
                    return console['log']('接口返回报文解密异常', _0x4a1e1a),
                    {
                        'retCode': '999999',
                        'retDesc': '请求无法受理,请稍后再试!'
                    };
                }
                return _0x4a1e1a;
            }
            return {
                'retCode': '999999',
                'retDesc': '请求无法受理,请稍后再试!'
            };
        }, function(_0x321a59) {

解密方法

// 原始解密代码
function _0x237e37(_0x1eee37) {
    var _0x149c20 = _0x2fac5a()['enc']['Utf8']['parse'](_0x158e73(_0x374fe2['split'](',')))
      , _0x564249 = _0x2fac5a()['enc']['Utf8']['parse'](_0x158e73(_0x58ae3b['split'](',')));
    window['location']['href']['indexOf']('cmcc-app-gray') > -0x1 && (_0x149c20 = _0x2fac5a()['enc']['Utf8']['parse'](_0x158e73(_0x4bf3cc['split'](','))),
    _0x564249 = _0x2fac5a()['enc']['Utf8']['parse'](_0x158e73(_0x2378c2['split'](','))));
    var _0x37d7b1 = _0x2fac5a()['AES']['decrypt'](_0x1eee37, _0x149c20, {
        'iv': _0x564249,
        'mode': _0x2fac5a()['mode']['CBC']
    });
    return _0x2fac5a()['enc']['Utf8']['stringify'](_0x37d7b1);
}
        
// 使用 ChatGPT 翻译后代码
function decrypt(ciphertext) {

    var key = CryptoJS.enc.Utf8.parse("Uvic06tpXgMNiApm");
    var iv  = CryptoJS.enc.Utf8.parse("9791027341711819");

    if (window.location.href.indexOf('cmcc-app-gray') > -1) {
        key = CryptoJS.enc.Utf8.parse("t6MoEZ94s0bDOaws");
        iv  = CryptoJS.enc.Utf8.parse("1234567890123456");
    }

    var decrypted = CryptoJS.AES.decrypt(ciphertext, key, {
        iv: iv,
        mode: CryptoJS.mode.CBC,
        padding: CryptoJS.pad.Pkcs7
    });

    return CryptoJS.enc.Utf8.stringify(decrypted);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment