()
| 300 | }); |
| 301 | console.log("Speedtest CLI downloaded and extracted successfully."); |
| 302 | } |
| 303 | |
| 304 | function getEncryptionKey(): string { |
| 305 | if (fs.existsSync(KEY_PATH)) return fs.readFileSync(KEY_PATH, "utf-8"); |
| 306 | const newKey = crypto.randomBytes(16).toString("hex"); |
| 307 | fs.writeFileSync(KEY_PATH, newKey, "utf-8"); |
| 308 | console.log(`SpeedLink Plugin (${PLUGIN_NAME}): New encryption key generated.`); |
| 309 | return newKey; |
| 310 | } |
| 311 |