开启辅助访问 切换到宽版

精易论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

用微信号发送消息登录论坛

新人指南 邀请好友注册 - 我关注人的新帖 教你赚取精币 - 每日签到


求职/招聘- 论坛接单- 开发者大厅

论坛版规 总版规 - 建议/投诉 - 应聘版主 - 精华帖总集 积分说明 - 禁言标准 - 有奖举报

查看: 960|回复: 7
收起左侧

[精币悬赏] 一段js代码转换PHP代码

[复制链接]
结帖率:70% (42/60)
发表于 2022-3-12 16:49:41 | 显示全部楼层 |阅读模式   山东省滨州市
60精币
调用 ckey.wasm 密钥,改成PHP代码,谢谢了大神

  
var document = {
URL: "https://v.qq.com/x/cover/mzc00200w9qrf4g.html",
referrer: ""
}
window = this
function w () {
Fa = new Int8Array (Ea),
Ha = new Int16Array (Ea),
Ja = new Int32Array (Ea),
Ga = new Uint8Array (Ea),
Ia = new Uint16Array (Ea),
Ka = new Uint32Array (Ea),
La = new Float32Array (Ea),
Ma = new Float64Array (Ea);
}
function d (a) {
var b = Oa;
return Oa = Oa + a + 15 & -16,
b
}
function e (a, b) {
b || (b = Da);
var c = a = Math.ceil (a / b) * b;
return c
}
function i (a, b, c, d, e) {
function f (a) {
return "string" === b ? k (a) : "boolean" === b ? Boolean (a) : a
}
var i = wasmobject.exports._getckey //h (a)
,
j = [],
l = 0;
// if (g ("array" !== b, ' Return type should not be "array".'),
//     d)
if (d) for (var m = 0; m < d.length; m++) {
var n = $a[c[m]];
// n ? (0 === l && (l = Ub ()),
n ? (0 === l && (l = Ub ()), j[m] = n (d[m])) : j[m] = d[m]
}
var o = i.apply (null, j);
return o = f (o),
0 !== l && Tb (l),
o
}
function k (a, b) {
if (0 === b || !a) return "";
for (var c, d = 0,
e = 0;;) {
// if (g (a + e < db),
if (c = Ga[a + e >> 0], d |= c, 0 == c && !b) break;
if (e++, b && e == b) break
}
b || (b = e);
var f = "";
if (d < 128) {
for (var h, i = 1024; b > 0;) h = String.fromCharCode.apply (String, Ga.subarray (a, a + Math.min (b, i))),
f = f ? f + h: h,
a += i,
b -= i;
return f
}
return m (a)
}
function o (a, b, c) {
return n (a, Ga, b, c)
}
function n (a, b, c, d) {
if (! (d > 0)) return 0;
for (var e = c,
f = c + d - 1,
g = 0; g < a.length; ++g) {
var h = a.charCodeAt (g);
if (h >= 55296 && h <= 57343) {
var i = a.charCodeAt (++g);
h = 65536 + ( (1023 & h) << 10) | 1023 & i
}
if (h <= 127) {
if (c >= f) break;
b[c++] = h
} else if (h <= 2047) {
if (c + 1 >= f) break;
b[c++] = 192 | h >> 6,
b[c++] = 128 | 63 & h
} else if (h <= 65535) {
if (c + 2 >= f) break;
b[c++] = 224 | h >> 12,
b[c++] = 128 | h >> 6 & 63,
b[c++] = 128 | 63 & h
} else if (h <= 2097151) {
if (c + 3 >= f) break;
b[c++] = 240 | h >> 18,
b[c++] = 128 | h >> 12 & 63,
b[c++] = 128 | h >> 6 & 63,
b[c++] = 128 | 63 & h
} else if (h <= 67108863) {
if (c + 4 >= f) break;
b[c++] = 248 | h >> 24,
b[c++] = 128 | h >> 18 & 63,
b[c++] = 128 | h >> 12 & 63,
b[c++] = 128 | h >> 6 & 63,
b[c++] = 128 | 63 & h
} else {
if (c + 5 >= f) break;
b[c++] = 252 | h >> 30,
b[c++] = 128 | h >> 24 & 63,
b[c++] = 128 | h >> 18 & 63,
b[c++] = 128 | h >> 12 & 63,
b[c++] = 128 | h >> 6 & 63,
b[c++] = 128 | 63 & h
}
}
return b[c] = 0,
c - e
}
function Tb () {
return wasmobject.exports.stackRestore.apply (null, arguments)
}
function Ub () {
return wasmobject.exports.stackSave.apply (null, arguments)
}
function Sb () {
return wasmobject.exports.stackAlloc.apply (null, arguments)
}
function Pb () {
return wasmobject.exports._malloc.apply (null, arguments)
}
function P () { // function 20 ( )
function p (a) {
for (var b = 0,
c = 0; c < a.length; ++c) {
var d = a.charCodeAt (c);
d >= 55296 && d <= 57343 && (d = 65536 + ( (1023 & d) << 10) | 1023 & a.charCodeAt (++c)),
d <= 127 ? ++b: b += d <= 2047 ? 2 : d <= 65535 ? 3 : d <= 2097151 ? 4 : d <= 67108863 ? 5 : 6
}
return b
}
function a (a) {
return a ? a.length > 48 ? a.substr (0, 48) : a: ""
}
function b () {
var b = document.URL,
c = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36",
d = "";
document.referrer.length > 0 && (d = document.referrer);
try {
0 == d.length && opener.location.href.length > 0 && (d = opener.location.href)
} catch (e) {}
var f = "Mozilla",
g = "Netscape",
h = "Win32";
return b = a (b),
d = a (d),
c = a (c),
b + "|" + c + "|" + d + "|" + f + "|" + g + "|" + h
}
var c = b (),
d = p (c) + 1,
e = Pb (d);
return o (c, e, d + 1),
e
}
function C () {
return db
}
var $a = {
string: function (a) {
var b = 0;
if (null !== a && void 0 !== a && 0 !== a) {
var c = (a.length << 2) + 1;
b = Sb (c),
o (a, b, c)
}
return b
},
array: function (a) {
var b = Sb (a.length);
return K (a, b),
b
}
};
//////////////////////////////// init global var
var Da = 16;
var Ea, Fa, Ga, Ha, Ia, Ja, Ka, La, Ma, Na, Oa, Pa, Qa, Ra, Sa, Ta, Ua, Va = {
"f64-rem": function (a, b) {
return a % b
},
"debugger": function () {}
},
Wa = (new Array (0), 1024);
Na = Oa = Qa = Ra = Sa = Ta = Ua = 0,
Pa = !1;
var cb = 5242880,
db = 16777216,
ab = 65536;
var wasmMemory = new WebAssembly.Memory ({
initial: db / ab,
maximum: db / ab
});
Ea = wasmMemory.buffer;
w ();
Ja[0] = 1668509029;
Ha[1] = 25459;
var eb = [],
fb = [],
gb = [],
hb = [],
ib = !1,
jb = !1;
Na = Wa,
Oa = Na + 6928,
fb.push ();
Oa += 16;
Ua = d (4),
Qa = Ra = e (Oa),
Sa = Qa + cb,
Ta = e (Sa),
Ja[Ua >> 2] = Ta,
Pa = !0;
////////////////////////////////// wasm env ///////////////////////////////////////
var fun_ = function () {};
wasm_env = {
abort: fun_,
assert: fun_,
enlargeMemory: fun_,
getTotalMemory: C,
abortOnCannotGrowMemory: fun_,
abortStackOverflow: fun_,
nullFunc_ii: fun_,
nullFunc_iiii: fun_,
nullFunc_v: fun_,
nullFunc_vi: fun_,
nullFunc_viiii: fun_,
nullFunc_viiiii: fun_,
nullFunc_viiiiii: fun_,
invoke_ii: fun_,
invoke_iiii: fun_,
invoke_v: fun_,
invoke_vi: fun_,
invoke_viiii: fun_,
invoke_viiiii: fun_,
invoke_viiiiii: fun_,
__ZSt18uncaught_exceptionv: fun_,
___cxa_find_matching_catch: fun_,
___gxx_personality_v0: fun_,
___lock: fun_,
___resumeException: fun_,
___setErrNo: fun_,
___syscall140: fun_,
___syscall146: fun_,
___syscall54: fun_,
___syscall6: fun_,
___unlock: fun_,
_abort: fun_,
_emscripten_memcpy_big: fun_,
_get_unicode_str: P,
// function 20 ( ) => P ( )
flush_NO_FILESYSTEM: fun_,
DYNAMICTOP_PTR: 7968,
//Ua
tempDoublePtr: 7952,
//rb
STACKTOP: 7984,
//Ra
STACK_MAX: 5250864,
//Sa
memoryBase: 1024,
tableBase: 0,
memory: wasmMemory,
table: new WebAssembly.Table ({
initial: 99,
maximum: 99,
element: "anyfunc"
})
};
var importObject = {
' env': wasm_env,
' asm2wasm': {
"f64-rem": function (a, b) {
return a % b
},
"debugger": function () {}
},
' global': {
NaN: NaN,
Infinity: 1 / 0
},
"global.Math": Math
//"parent": "";
};
///////////////////////////////// load wasm ///////////////////////////////////////
const fs = require ( ' fs');
var wasm_data = fs.readFileSync ( ' ckey.wasm');
var buffer = new Uint8Array (wasm_data);
var wasmobject = new WebAssembly.Instance (new WebAssembly.Module (buffer), importObject);
// function setnavigator (URL, referrer, userAgent, appCodeName, appName, platform){
//     navigator = {
//         userAgent: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36",
//         appCodeName: "Mozilla",
//         appName: "Netscape",
//         platform: "Win32"
//     };
//     window.navigator = navigator;
//
// }
function setdocument (URL, referrer) {
document.URL = URL;
document.referrer = referrer;
}
// encryptVer = "9.1"
function getckey (vid, guid, tm) {
var platform = ' 10201';
var appVer = ' 3.5.57';
empty_str = "";
// var guid = ' cb68b765165403f7c83e102cfba61430';
var _args = [platform, appVer, vid, empty_str = "", guid, tm];
var c = [ ' number', 'string', 'string', 'string', 'string', 'number'];
return i ( ' getckey', 'string', c, _args, undefined)
}
//  playerID, guid
function createGUID (a) {
a = a || 32;
for (var b = "",
c = 1; c <= a; c++) {
var d = Math.floor (16 * Math.random ()).toString (16);
b += d
}
return b
}
/////////////////////////
var _t = Date.parse (new Date ())/1000;
var args = process.argv.slice (2);
vid = args[0]
guid = args[1]
console.log (getckey (vid, guid, _t));

结帖率:22% (2/9)
发表于 2022-3-12 18:15:07 | 显示全部楼层   湖南省衡阳市
const fs = require('fs');        是不是还有东西没发上来
回复

使用道具 举报

结帖率:70% (42/60)
 楼主| 发表于 2022-3-12 18:20:29 | 显示全部楼层   山东省滨州市
a120802550 发表于 2022-3-12 18:15
const fs = require('fs');        是不是还有东西没发上来

都发上来了
回复

使用道具 举报

结帖率:70% (42/60)
 楼主| 发表于 2022-3-12 18:21:35 | 显示全部楼层   山东省滨州市
a120802550 发表于 2022-3-12 18:15
const fs = require('fs');        是不是还有东西没发上来

[Python] 纯文本查看 复制代码
def get_ckey(self, vid):
        # refresh_js(vid)
        guid = ''   # 我的是 cb68b765165403f7***e102cfba61430
        text = "node tx.js {0} {1}".format(vid, guid)
        p = subprocess.run(text, shell=True, stdout=subprocess.PIPE)
        result = p.stdout.decode("utf-8")
        # print(result)
        return result


回复

使用道具 举报

结帖率:70% (42/60)
 楼主| 发表于 2022-3-15 09:29:15 | 显示全部楼层   山东省滨州市
a120802550 发表于 2022-3-12 18:15
const fs = require('fs');        是不是还有东西没发上来

大佬能改吗
回复

使用道具 举报

结帖率:0% (0/1)

签到天数: 22 天

发表于 2022-7-17 18:45:07 | 显示全部楼层   辽宁省抚顺市
百d有这转换工具
回复

使用道具 举报

结帖率:0% (0/1)

签到天数: 22 天

发表于 2022-7-17 18:45:34 | 显示全部楼层   辽宁省抚顺市
你可以去看看
回复

使用道具 举报

结帖率:70% (42/60)
 楼主| 发表于 2022-7-18 15:23:12 | 显示全部楼层   山东省滨州市

没有找到
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 致发广告者

发布主题 收藏帖子 返回列表

sitemap| 易语言源码| 易语言教程| 易语言论坛| 易语言模块| 手机版| 广告投放| 精易论坛
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
论坛帖子内容仅用于技术交流学习和研究的目的,严禁用于非法目的,否则造成一切后果自负!如帖子内容侵害到你的权益,请联系我们!
防范网络诈骗,远离网络犯罪 违法和不良信息举报电话0663-3422125,QQ: 793400750,邮箱:wp@125.la
Powered by Discuz! X3.4 揭阳市揭东区精易科技有限公司 ( 粤ICP备12094385号-1) 粤公网安备 44522102000125 增值电信业务经营许可证 粤B2-20192173

快速回复 返回顶部 返回列表