🎁 Sync 2026-10-18 22:41:16

This commit is contained in:
github-actions[bot] committed 2026-10-18 22:41:16 +08:00
1 parent 3eca35a513
commit 3159b4f938
88 files changed
+5597 -1051

No files matched your search

+5 -4
View File
@@ -270,10 +270,11 @@ end
-- 计算字符串 MD5
function md5_string(str)
if type(str) ~= "string" then return "" end
local quoted = "'" .. str:gsub("'", "'\\''") .. "'"
local out = sys.exec("printf '%s' " .. quoted .. " | md5sum")
if not out then return "" end
return out:sub(1, 32)
local path = trim(sys.exec("mktemp /tmp/md5.XXXXXX") or "")
if path == "" then return "" end
local md5 = fs.writefile(path, str) == #str and md5_file(path) or ""
fs.unlink(path)
return md5
end
--提取URL中的域名和端口(no ip)