getck_vqq.js 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  1. var document = {
  2. URL: "https://v.qq.com/x/cover/bzfkv5se8qaqel2/j002024w2wg.html",
  3. referrer: ""
  4. }
  5. var window = {
  6. document: document,
  7. navigator: {
  8. userAgent: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36",
  9. appCodeName: "Mozilla",
  10. appName: "Netscape",
  11. platform: "Win32"
  12. },
  13. };
  14. function w() {
  15. Fa = new Int8Array(Ea),
  16. Ha = new Int16Array(Ea),
  17. Ja = new Int32Array(Ea),
  18. Ga = new Uint8Array(Ea),
  19. Ia = new Uint16Array(Ea),
  20. Ka = new Uint32Array(Ea),
  21. La = new Float32Array(Ea),
  22. Ma = new Float64Array(Ea);
  23. }
  24. function d(a) {
  25. var b = Oa;
  26. return Oa = Oa + a + 15 & -16,
  27. b
  28. }
  29. function e(a, b) {
  30. b || (b = Da);
  31. var c = a = Math.ceil(a / b) * b;
  32. return c
  33. }
  34. function i(a, b, c, d, e){
  35. function f(a) {
  36. return "string" === b ? k(a) : "boolean" === b ? Boolean(a) : a
  37. }
  38. var i = wasmobject.exports._getckey //h(a)
  39. , j = []
  40. , l = 0;
  41. // if (g("array" !== b, 'Return type should not be "array".'),
  42. // d)
  43. if (d)
  44. for (var m = 0; m < d.length; m++) {
  45. var n = $a[c[m]];
  46. // n ? (0 === l && (l = Ub()),
  47. n ? (0 === l && (l = Ub()),
  48. j[m] = n(d[m])) : j[m] = d[m]
  49. }
  50. var o = i.apply(null, j);
  51. return o = f(o),
  52. 0 !== l && Tb(l),
  53. o
  54. }
  55. function k(a, b) {
  56. if (0 === b || !a)
  57. return "";
  58. for (var c, d = 0, e = 0; ; ) {
  59. // if (g(a + e < db),
  60. if (
  61. c = Ga[a + e >> 0],
  62. d |= c,
  63. 0 == c && !b)
  64. break;
  65. if (e++,
  66. b && e == b)
  67. break
  68. }
  69. b || (b = e);
  70. var f = "";
  71. if (d < 128) {
  72. for (var h, i = 1024; b > 0; )
  73. h = String.fromCharCode.apply(String, Ga.subarray(a, a + Math.min(b, i))),
  74. f = f ? f + h : h,
  75. a += i,
  76. b -= i;
  77. return f
  78. }
  79. return m(a)
  80. }
  81. function o(a, b, c) {
  82. return n(a, Ga, b, c)
  83. }
  84. function n(a, b, c, d) {
  85. if (!(d > 0))
  86. return 0;
  87. for (var e = c, f = c + d - 1, g = 0; g < a.length; ++g) {
  88. var h = a.charCodeAt(g);
  89. if (h >= 55296 && h <= 57343) {
  90. var i = a.charCodeAt(++g);
  91. h = 65536 + ((1023 & h) << 10) | 1023 & i
  92. }
  93. if (h <= 127) {
  94. if (c >= f)
  95. break;
  96. b[c++] = h
  97. } else if (h <= 2047) {
  98. if (c + 1 >= f)
  99. break;
  100. b[c++] = 192 | h >> 6,
  101. b[c++] = 128 | 63 & h
  102. } else if (h <= 65535) {
  103. if (c + 2 >= f)
  104. break;
  105. b[c++] = 224 | h >> 12,
  106. b[c++] = 128 | h >> 6 & 63,
  107. b[c++] = 128 | 63 & h
  108. } else if (h <= 2097151) {
  109. if (c + 3 >= f)
  110. break;
  111. b[c++] = 240 | h >> 18,
  112. b[c++] = 128 | h >> 12 & 63,
  113. b[c++] = 128 | h >> 6 & 63,
  114. b[c++] = 128 | 63 & h
  115. } else if (h <= 67108863) {
  116. if (c + 4 >= f)
  117. break;
  118. b[c++] = 248 | h >> 24,
  119. b[c++] = 128 | h >> 18 & 63,
  120. b[c++] = 128 | h >> 12 & 63,
  121. b[c++] = 128 | h >> 6 & 63,
  122. b[c++] = 128 | 63 & h
  123. } else {
  124. if (c + 5 >= f)
  125. break;
  126. b[c++] = 252 | h >> 30,
  127. b[c++] = 128 | h >> 24 & 63,
  128. b[c++] = 128 | h >> 18 & 63,
  129. b[c++] = 128 | h >> 12 & 63,
  130. b[c++] = 128 | h >> 6 & 63,
  131. b[c++] = 128 | 63 & h
  132. }
  133. }
  134. return b[c] = 0,
  135. c - e
  136. }
  137. function Tb(){
  138. return wasmobject.exports.stackRestore.apply(null, arguments)
  139. }
  140. function Ub(){
  141. return wasmobject.exports.stackSave.apply(null, arguments)
  142. }
  143. function Sb(){
  144. return wasmobject.exports.stackAlloc.apply(null, arguments)
  145. }
  146. function Pb(){
  147. return wasmobject.exports._malloc.apply(null, arguments)
  148. }
  149. function P() { // function 20( )
  150. function p(a) {
  151. for (var b = 0, c = 0; c < a.length; ++c) {
  152. var d = a.charCodeAt(c);
  153. d >= 55296 && d <= 57343 && (d = 65536 + ((1023 & d) << 10) | 1023 & a.charCodeAt(++c)),
  154. d <= 127 ? ++b : b += d <= 2047 ? 2 : d <= 65535 ? 3 : d <= 2097151 ? 4 : d <= 67108863 ? 5 : 6
  155. }
  156. return b
  157. }
  158. function a(a) {
  159. return a ? a.length > 48 ? a.substr(0, 48) : a : ""
  160. }
  161. function b() {
  162. var b = document.URL
  163. , c = window.navigator.userAgent.toLowerCase()
  164. , d = "";
  165. document.referrer.length > 0 && (d = document.referrer);
  166. try {
  167. 0 == d.length && opener.location.href.length > 0 && (d = opener.location.href)
  168. } catch (e) {}
  169. var f = window.navigator.appCodeName
  170. , g = window.navigator.appName
  171. , h = window.navigator.platform;
  172. return b = a(b),
  173. d = a(d),
  174. c = a(c),
  175. b + "|" + c + "|" + d + "|" + f + "|" + g + "|" + h
  176. }
  177. var c = b()
  178. , d = p(c) + 1
  179. , e = Pb(d);
  180. return o(c, e, d + 1),
  181. e
  182. }
  183. function C() {
  184. return db
  185. }
  186. var $a = {
  187. string: function(a) {
  188. var b = 0;
  189. if (null !== a && void 0 !== a && 0 !== a) {
  190. var c = (a.length << 2) + 1;
  191. b = Sb(c),
  192. o(a, b, c)
  193. }
  194. return b
  195. },
  196. array: function(a) {
  197. var b = Sb(a.length);
  198. return K(a, b),
  199. b
  200. },
  201. };
  202. //////////////////////////////// init global var
  203. var Da = 16;
  204. var Ea, Fa, Ga, Ha, Ia, Ja, Ka, La, Ma, Na, Oa, Pa, Qa, Ra, Sa, Ta, Ua, Va = {
  205. "f64-rem": function(a, b) {
  206. return a % b
  207. },
  208. "debugger": function() {}
  209. }, Wa = (new Array(0), 1024) ;
  210. Na = Oa = Qa = Ra = Sa = Ta = Ua = 0,
  211. Pa = !1;
  212. var cb = 5242880 , db = 16777216, ab = 65536;
  213. var wasmMemory = new WebAssembly.Memory({
  214. initial: db / ab,
  215. maximum: db / ab
  216. });
  217. Ea = wasmMemory.buffer;
  218. w();
  219. Ja[0] = 1668509029;
  220. Ha[1] = 25459;
  221. var eb = []
  222. , fb = []
  223. , gb = []
  224. , hb = []
  225. , ib = !1
  226. , jb = !1;
  227. Na = Wa,
  228. Oa = Na + 6928,
  229. fb.push();
  230. Oa += 16;
  231. Ua = d(4),
  232. Qa = Ra = e(Oa),
  233. Sa = Qa + cb,
  234. Ta = e(Sa),
  235. Ja[Ua >> 2] = Ta,
  236. Pa = !0;
  237. ////////////////////////////////// wasm env ///////////////////////////////////////
  238. var fun_ = function(){};
  239. wasm_env = {
  240. abort: fun_,
  241. assert: fun_,
  242. enlargeMemory: fun_,
  243. getTotalMemory: C,
  244. abortOnCannotGrowMemory: fun_,
  245. abortStackOverflow: fun_,
  246. nullFunc_ii: fun_,
  247. nullFunc_iiii: fun_,
  248. nullFunc_v: fun_,
  249. nullFunc_vi: fun_,
  250. nullFunc_viiii: fun_,
  251. nullFunc_viiiii: fun_,
  252. nullFunc_viiiiii: fun_,
  253. invoke_ii: fun_,
  254. invoke_iiii: fun_,
  255. invoke_v: fun_,
  256. invoke_vi: fun_,
  257. invoke_viiii: fun_,
  258. invoke_viiiii: fun_,
  259. invoke_viiiiii: fun_,
  260. __ZSt18uncaught_exceptionv: fun_,
  261. ___cxa_find_matching_catch: fun_,
  262. ___gxx_personality_v0: fun_,
  263. ___lock: fun_,
  264. ___resumeException: fun_,
  265. ___setErrNo: fun_,
  266. ___syscall140: fun_,
  267. ___syscall146: fun_,
  268. ___syscall54: fun_,
  269. ___syscall6: fun_,
  270. ___unlock: fun_,
  271. _abort: fun_,
  272. _emscripten_memcpy_big: fun_,
  273. _get_unicode_str: P, // function 20( ) => P( )
  274. flush_NO_FILESYSTEM: fun_,
  275. DYNAMICTOP_PTR: 7968, //Ua
  276. tempDoublePtr: 7952, //rb
  277. STACKTOP: 7984, //Ra
  278. STACK_MAX: 5250864, //Sa
  279. memoryBase: 1024,
  280. tableBase: 0,
  281. memory: wasmMemory,
  282. table: new WebAssembly.Table({
  283. initial: 99,
  284. maximum: 99,
  285. element: "anyfunc"
  286. })
  287. };
  288. var importObject = {
  289. 'env': wasm_env,
  290. 'asm2wasm': {
  291. "f64-rem": function(a, b) {
  292. return a % b
  293. },
  294. "debugger": function() {}
  295. },
  296. 'global': {
  297. NaN: NaN,
  298. Infinity: 1 / 0
  299. },
  300. "global.Math": Math,
  301. // "parent": {};
  302. };
  303. ///////////////////////////////// load wasm ///////////////////////////////////////
  304. const fs = require('fs');
  305. var wasm_data = fs.readFileSync('./js/tx-ckey.wasm')
  306. var buffer = new Uint8Array(wasm_data);
  307. var wasmobject = new WebAssembly.Instance(new WebAssembly.Module(buffer), importObject);
  308. // function setnavigator(URL, referrer, userAgent, appCodeName, appName, platform){
  309. // navigator = {
  310. // userAgent: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36",
  311. // appCodeName: "Mozilla",
  312. // appName: "Netscape",
  313. // platform: "Win32"
  314. // };
  315. // window.navigator = navigator;
  316. //
  317. // }
  318. function setdocument(URL, referrer){
  319. document.URL = URL;
  320. document.referrer = referrer;
  321. }
  322. // encryptVer = "9.1"
  323. function getckey(platform, appVer, vid, empty_str="", guid, tm){
  324. var _args = [platform, appVer, vid, empty_str="", guid, tm];
  325. var c = ['number', 'string', 'string', 'string', 'string', 'number'];
  326. return i('getckey', 'string', c, _args, undefined)
  327. }
  328. // playerID, guid
  329. function createGUID(a) {
  330. a = a || 32;
  331. for (var b = "", c = 1; c <= a; c++) {
  332. var d = Math.floor(16 * Math.random()).toString(16);
  333. b += d
  334. }
  335. return b
  336. }