🔧 Update script metadata and enhance wget.ts with token validation and permission changes

This commit is contained in:
2026-04-12 09:57:10 +08:00
parent 8dd0a4a83f
commit 9956702df5
2 changed files with 9 additions and 6 deletions

View File

@@ -367,11 +367,11 @@
},
"wget.ts": {
"script_name": "wget.ts",
"script_length": 5225,
"script_sha256": "85351654565fa92b21d33706339ededb804eff1484eb2ddb1d9dda44de7f4809",
"script_length": 5251,
"script_sha256": "6eb6297108d7d3719ae3d25689cbb0fc790a1577533fa70d94134cd88adbb8ab",
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/wget.ts",
"single_script_file": true,
"publish_time": 1737272626139,
"update_time": 1775958532700
"update_time": 1775959013881
}
}

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env runts -- --allow-env --allow-import --allow-read --allow-write --allow-net
#!/usr/bin/env runts -- --allow-all
// Reference:
// - https://docs.deno.com/examples/command_line_arguments/
@@ -144,6 +144,9 @@ if (hatterProxy) {
"play.hatter.me",
"xgetfile-token",
);
if (!token) {
throw new Error(`Token not found`);
}
realUrl = `https://play.hatter.me/xgetfile?__token=${
encodeURIComponent(token)
}&url=${encodeURIComponent(url)}`;
@@ -180,5 +183,5 @@ log.success(
}`,
);
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260412T094849+08:00.MEUCIG7syjAuNPOfrHQAfttO
// 2EmdB61bKIeShvk/abV5e7p1AiEAvxySKwi2Kw+QGjviTGLdB+CgiaciPp2OH1YRI7ozdls=
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260412T095641+08:00.MEYCIQC6Qwz7YNhcunDVIDzC
// HjRPVTi1+Ph4FbGDxZuR6lNiUwIhAJyJTsUPZrBT5GYm+9mIlN6mYCbMHce1aU6jYbe4fnyh