分析代码
function xGorgon(path, params, data, ck) {
        const { java, source } = this;
        params = [
            params,
            "aid=1967",
            "channel=0",
            "os_version=0",
            "app_name=novelapp",
            "version_code=66.9",
            "device_platform=android",
            source.getLoginHeader() || ""
        ]
            .join("&")
            .split("&")
            .sort()
            .join("&")
            .replace(/^&+/, "");
        if (!data) {
            path = "/reading/bookapi/" + path + "/v/?";
        }
        let url = getHost() + path + params;
        let devtype;
        for (let i of (source.getLoginHeader() || "").split("&")) {
            // java.log(i)
            if (i.startsWith("device_type")) {
                // java.log(i)
                devtype = i.split("=")[1];
            }
        }

        let md5, rStr, Hex, rHex;
        //md5加密
        md5 = str => DigestUtil.md5Hex(str);

        //反转字符串
        rStr = str => StrUtil.reverse(str);

        //10转16进制
        Hex = num => num.toString(16).padStart(2, "0");

        //反转16进制
        rHex = num => parseInt(rStr(Hex(num)), 16);

        //反转2进制
        function rBin(num) {
            let bin = num.toString(2).padStart(8, "0");
            return parseInt(rStr(bin), 2);
        }

        //运算
        function getHex(ck) {
            let hex = md5(params);
            hex += data ? md5(data) : "0".repeat(8);
            hex += ck ? md5(ck) : "0".repeat(8);
            return hex;
        }

        function calculate(hex, ck) {
            let len = 0x14;
            let key = [
                0xdf, 0x77, 0xb9, 0x40, 0xb9, 0x9b, 0x84, 0x83, 0xd1, 0xb9,
                0xcb, 0xd1, 0xf7, 0xc2, 0xb9, 0x85, 0xc3, 0xd0, 0xfb, 0xc3
            ];
            let paramList = [];
            for (let i = 0; i < 9; i += 4) {
                let temp = hex.substring(8 * i, 8 * (i + 1));
                for (let j = 0; j < 4; j++) {
                    let h = parseInt(temp.substring(j * 2, (j + 1) * 2), 16);
                    paramList.push(h);
                }
            }
            paramList.push(0x0, 0x6, 0xb, 0x1c);
            let T = Math.floor(Date.now() / 1000);
            paramList.push(
                (T >> 24) & 0xff,
                (T >> 16) & 0xff,
                (T >> 8) & 0xff,
                T & 0xff
            );
            //异或
            let eorResultList = [];
            for (let i = 0; i < paramList.length; i++) {
                eorResultList.push(paramList[i] ^ key[i % len]);
            }
            for (let A, B, C, D, i = 0; i < len; i++) {
                A = rHex(eorResultList[i]);
                B = eorResultList[(i + 1) % len];
                C = rBin(A ^ B);
                D = (C ^ 0xffffffff ^ len) & 0xff;
                eorResultList[i] = D;
            }
            let result = "";
            for (let param of eorResultList) {
                result += Hex(param);
            }
            let option = {
                headers: {
                    "X-Khronos": String(T),
                    "X-Gorgon": "0404b0d30000" + result,
                    "User-Agent": "com.dragon.read",
                    Cookie: ck ? ck : ""
                }
            };
            let b_ = option;
            b_["body"] = String(data ? data : "");
            java.log(url + "," + JSON.stringify(b_));
            if (data) {
                return post(url, data, option.headers).data;
            } else {
                return url + "," + JSON.stringify(option);
            }
        }
        return calculate(getHex(ck), ck);
    }