Download test.js from luosakura-service/dataset: direct link, hf CLI and curl.
- Browser
- Download file 11.1 kB
-
https://huggingface.co/datasets/luosakura-service/dataset/resolve/main/test.js
- Command line
-
hf download hf://datasets/luosakura-service/dataset/test.js
-
curl -L -o test.js https://huggingface.co/datasets/luosakura-service/dataset/resolve/main/test.js
11.1 kB
| function createO(e = 21) { | |
| let t = "" | |
| , n = crypto.getRandomValues(new Uint8Array(e |= 0)); | |
| for (; e--;) | |
| t += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63 & n[e]]; | |
| return t | |
| } | |
| // 这里的e需要有url,以及method | |
| function getData(e, post_body) { | |
| if ("GET" === e.method) { | |
| var n, r = e.url.indexOf("?"); | |
| if (-1 !== r) | |
| return e.url.substring(r + 1) | |
| } else if ("POST" === e.method) | |
| return null !== (n = post_body) && void 0 !== n ? n : ""; | |
| return "" | |
| } | |
| import crypto from 'crypto' | |
| function md5(text) { | |
| let d = crypto.createHash('md5') | |
| d.write(text); | |
| return d.digest('hex').toString() | |
| } | |
| console.log(md5(`1747566987{"pageIndex":1,"pageSize":5,"sortType":1,"title":"b"}aUswti0LnUAW5UXqDbZfu`).toUpperCase()) | |
| // 以下是wasm版加密 | |
| let wasmInstanceExports; | |
| let memory = null; | |
| function getMemory() { | |
| return (null === memory || 0 === memory.byteLength) && (memory = new Uint8Array(wasmInstanceExports.memory.buffer)), | |
| memory | |
| } | |
| function g(e, t, n) { | |
| // if (void 0 === n) { // 这个可以不看,必然不触发 | |
| // var r = h.encode(e) | |
| // , o = t(r.length, 1) >>> 0; | |
| // return f().subarray(o, o + r.length).set(r), | |
| // p = r.length, | |
| // o | |
| // } | |
| for (var i = e.length, a = t(i, 1) >>> 0, s = getMemory(), c = 0; c < i; c++) { | |
| var l = e.charCodeAt(c); | |
| if (l > 127) | |
| break; | |
| s[a + c] = l | |
| } | |
| // if (c !== i) { // 这个可以不看,必然不触发 | |
| // 0 !== c && (e = e.slice(c)), | |
| // a = n(a, i, i = c + 3 * e.length, 1) >>> 0; | |
| // var u = m(e, f().subarray(a + c, a + i)); | |
| // c += u.written, | |
| // a = n(a, i, c, 1) >>> 0 | |
| // } | |
| return a | |
| } | |
| function doSomeThingAndThrowWhenCatchError(e, t) { | |
| try { | |
| return e.apply(this, t) | |
| } catch (e) { | |
| var n = a(e); | |
| wasmInstanceExports.__wbindgen_exn_store(n) | |
| } | |
| } | |
| function a(e) { | |
| var t = wasmInstanceExports.__externref_table_alloc(); | |
| return wasmInstanceExports.__wbindgen_export_2.set(t, e), | |
| t | |
| } | |
| function isNull(e) { | |
| return null == e | |
| } | |
| var l = new TextDecoder("utf-8", { | |
| ignoreBOM: !0, | |
| fatal: !0 | |
| }) | |
| function decodeMemoryContent(e, t) { | |
| return e >>>= 0, | |
| l.decode(getMemory().subarray(e, e + t)) | |
| } | |
| let dataview = null; | |
| function getdataview() { | |
| return (null === dataview || !0 === dataview.buffer.detached || void 0 === dataview.buffer.detached && dataview.buffer !== wasmInstanceExports.memory.buffer) && (dataview = new DataView(wasmInstanceExports.memory.buffer)), | |
| dataview | |
| } | |
| (wasmImports = {}).wbg = {}, | |
| wasmImports.wbg.__wbg_buffer_609cc3eee51ed158 = function (e) { | |
| return e.buffer | |
| } | |
| , | |
| wasmImports.wbg.__wbg_call_672a4d21634d4a24 = function () { | |
| return doSomeThingAndThrowWhenCatchError(function (e, t) { | |
| return e.call(t) | |
| }, arguments) | |
| } | |
| , | |
| wasmImports.wbg.__wbg_call_7cccdd69e0791ae2 = function () { | |
| return doSomeThingAndThrowWhenCatchError(function (e, t, n) { | |
| return e.call(t, n) | |
| }, arguments) | |
| } | |
| , | |
| wasmImports.wbg.__wbg_crypto_ed58b8e10a292839 = function (e) { | |
| return e.crypto | |
| } | |
| , | |
| wasmImports.wbg.__wbg_document_d249400bd7bd996d = function (e) { | |
| var t = e.document; | |
| return isNull(t) ? 0 : a(t) | |
| } | |
| , | |
| wasmImports.wbg.__wbg_getElementById_f827f0d6648718a8 = function (e, t, n) { | |
| var r = e.getElementById(decodeMemoryContent(t, n)); | |
| return isNull(r) ? 0 : a(r) | |
| } | |
| , | |
| wasmImports.wbg.__wbg_getRandomValues_bcb4912f16000dc4 = function () { | |
| return doSomeThingAndThrowWhenCatchError(function (e, t) { | |
| e.getRandomValues(t) | |
| }, arguments) | |
| } | |
| , | |
| wasmImports.wbg.__wbg_getTime_46267b1c24877e30 = function (e) { | |
| return e.getTime() | |
| } | |
| , | |
| wasmImports.wbg.__wbg_instanceof_Window_def73ea0955fc569 = function (e) { | |
| var t; | |
| try { | |
| t = e instanceof Window | |
| } catch (e) { | |
| t = !1 | |
| } | |
| return t | |
| } | |
| , | |
| wasmImports.wbg.__wbg_msCrypto_0a36e2ec3a343d26 = function (e) { | |
| return e.msCrypto | |
| } | |
| , | |
| wasmImports.wbg.__wbg_new0_f788a2397c7ca929 = function () { | |
| return new Date | |
| } | |
| , | |
| wasmImports.wbg.__wbg_new_405e22f390576ce2 = function () { | |
| return {} | |
| } | |
| , | |
| wasmImports.wbg.__wbg_new_5e0be73521bc8c17 = function () { | |
| return new Map | |
| } | |
| , | |
| wasmImports.wbg.__wbg_new_78feb108b6472713 = function () { | |
| return [] | |
| } | |
| , | |
| wasmImports.wbg.__wbg_new_a12002a7f91c75be = function (e) { | |
| return new Uint8Array(e) | |
| } | |
| , | |
| wasmImports.wbg.__wbg_newnoargs_105ed471475aaf50 = function (e, t) { | |
| return Function(decodeMemoryContent(e, t)) | |
| } | |
| , | |
| wasmImports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function (e, t, n) { | |
| return new Uint8Array(e, t >>> 0, n >>> 0) | |
| } | |
| , | |
| wasmImports.wbg.__wbg_newwithlength_a381634e90c276d4 = function (e) { | |
| return new Uint8Array(e >>> 0) | |
| } | |
| , | |
| wasmImports.wbg.__wbg_node_02999533c4ea02e3 = function (e) { | |
| return e.node | |
| } | |
| , | |
| wasmImports.wbg.__wbg_process_5c1d670bc53614b8 = function (e) { | |
| return e.process | |
| } | |
| , | |
| wasmImports.wbg.__wbg_randomFillSync_ab2cfe79ebbf2740 = function () { | |
| return doSomeThingAndThrowWhenCatchError(function (e, t) { | |
| e.randomFillSync(t) | |
| }, arguments) | |
| } | |
| , | |
| wasmImports.wbg.__wbg_require_79b1e9274cde3c87 = function () { | |
| return doSomeThingAndThrowWhenCatchError(function () { | |
| return e.require | |
| }, arguments) | |
| } | |
| , | |
| wasmImports.wbg.__wbg_set_37837023f3d740e8 = function (e, t, n) { | |
| e[t >>> 0] = n | |
| } | |
| , | |
| wasmImports.wbg.__wbg_set_3f1d0b984ed272ed = function (e, t, n) { | |
| e[t] = n | |
| } | |
| , | |
| wasmImports.wbg.__wbg_set_65595bdd868b3009 = function (e, t, n) { | |
| e.set(t, n >>> 0) | |
| } | |
| , | |
| wasmImports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function (e, t, n) { | |
| return e.set(t, n) | |
| } | |
| , | |
| wasmImports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function () { // 获取window对象 | |
| var e = void 0 === n.g ? null : n.g; | |
| return isNull(e) ? 0 : a(e) | |
| } | |
| , | |
| wasmImports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function () { // 同样也是window对象 | |
| var e = "undefined" == typeof globalThis ? null : globalThis; | |
| return isNull(e) ? 0 : a(e) | |
| } | |
| , | |
| wasmImports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function () { // 还是window对象 | |
| var e = "undefined" == typeof self ? null : self; | |
| return isNull(e) ? 0 : a(e) | |
| } | |
| , | |
| wasmImports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function () { // 还是window | |
| var e = window; | |
| return isNull(e) ? 0 : a(e) | |
| } | |
| , | |
| wasmImports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function (e, t, n) { | |
| return e.subarray(t >>> 0, n >>> 0) | |
| } | |
| , | |
| wasmImports.wbg.__wbg_versions_c71aa1626a93e0a1 = function (e) { | |
| return e.versions | |
| } | |
| , | |
| wasmImports.wbg.__wbindgen_bigint_from_i64 = function (e) { | |
| return e | |
| } | |
| , | |
| wasmImports.wbg.__wbindgen_bigint_from_u64 = function (e) { | |
| return BigInt.asUintN(64, e) | |
| } | |
| , | |
| wasmImports.wbg.__wbindgen_debug_string = function (e, t) { | |
| var n = g(function e(t) { | |
| var n, r = typeof t; | |
| if ("number" == r || "boolean" == r || null == t) | |
| return "".concat(t); | |
| if ("string" == r) | |
| return '"'.concat(t, '"'); | |
| if ("symbol" == r) { | |
| var o = t.description; | |
| return null == o ? "Symbol" : "Symbol(".concat(o, ")") | |
| } | |
| if ("function" == r) { | |
| var i = t.name; | |
| return "string" == typeof i && i.length > 0 ? "Function(".concat(i, ")") : "Function" | |
| } | |
| if (Array.isArray(t)) { | |
| var a = t.length | |
| , s = "["; | |
| a > 0 && (s += e(t[0])); | |
| for (var c = 1; c < a; c++) | |
| s += ", " + e(t[c]); | |
| return s + "]" | |
| } | |
| var l = /\[object ([^\]]+)\]/.exec(toString.call(t)); | |
| if (!l || !(l.length > 1)) | |
| return toString.call(t); | |
| if ("Object" == (n = l[1])) | |
| try { | |
| return "Object(" + JSON.stringify(t) + ")" | |
| } catch (e) { | |
| return "Object" | |
| } | |
| return t instanceof Error ? "".concat(t.name, ": ").concat(t.message, "\n").concat(t.stack) : n | |
| }(t), wasmInstanceExports.__wbindgen_malloc, wasmInstanceExports.__wbindgen_realloc) | |
| , o = p; | |
| getdataview().setInt32(e + 4, o, !0), | |
| getdataview().setInt32(e + 0, n, !0) | |
| } | |
| , | |
| wasmImports.wbg.__wbindgen_error_new = function (e, t) { | |
| return Error(decodeMemoryContent(e, t)) | |
| } | |
| , | |
| wasmImports.wbg.__wbindgen_init_externref_table = function () { | |
| var e = wasmInstanceExports.__wbindgen_export_2 | |
| , t = e.grow(4); | |
| e.set(0, void 0), | |
| e.set(t + 0, void 0), | |
| e.set(t + 1, null), | |
| e.set(t + 2, !0), | |
| e.set(t + 3, !1) | |
| } | |
| , | |
| wasmImports.wbg.__wbindgen_is_function = function (e) { | |
| return "function" == typeof e | |
| } | |
| , | |
| wasmImports.wbg.__wbindgen_is_object = function (e) { | |
| return "object" == typeof e && null !== e | |
| } | |
| , | |
| wasmImports.wbg.__wbindgen_is_string = function (e) { | |
| return "string" == typeof e | |
| } | |
| , | |
| wasmImports.wbg.__wbindgen_is_undefined = function (e) { | |
| return void 0 === e | |
| } | |
| , | |
| wasmImports.wbg.__wbindgen_memory = function () { | |
| return wasmInstanceExports.memory | |
| } | |
| , | |
| wasmImports.wbg.__wbindgen_number_new = function (e) { | |
| return e | |
| } | |
| , | |
| wasmImports.wbg.__wbindgen_string_new = function (e, t) { | |
| return decodeMemoryContent(e, t) | |
| } | |
| , | |
| wasmImports.wbg.__wbindgen_throw = function (e, t) { | |
| throw Error(decodeMemoryContent(e, t)) | |
| }; | |
| function getSign(bodyJson, UrlPathname) { | |
| var n = g(bodyJson, wasmInstanceExports.__wbindgen_malloc, wasmInstanceExports.__wbindgen_realloc) | |
| , o = bodyJson.length | |
| , i = g(UrlPathname, wasmInstanceExports.__wbindgen_malloc, wasmInstanceExports.__wbindgen_realloc) | |
| , a = UrlPathname.length; | |
| return wasmInstanceExports.get_sign(n, o, i, a) | |
| } |