From e7620300d3ac9c4f9a4d9a6ec3c6890a8e396ce9 Mon Sep 17 00:00:00 2001 From: Ocarinaoftime <89474990+Ocarinaoftime@users.noreply.github.com> Date: Tue, 8 Oct 2024 11:49:59 -0400 Subject: [PATCH] Update main.js --- main.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 2ec94ac..bdab1eb 100644 --- a/main.js +++ b/main.js @@ -4,17 +4,22 @@ var fs = require('fs'); const app = express(); app.use(bodyParser.text()) app.post("/ecs/log", bodyParser.text({type: "*/*"}), function(req, res) { - console.log("Client sent EC log: " + req.body); + console.log("Got log file!\nWriting to file..."); // If you are on Windows, use .\ or C:\ when putting a directory. Ex. (C:\Users\\Downloads\ or whatever folder you want to store the logs in) // If you are on macOS / Linux / Unix-based system, use ./ or / when putting a directory. Ex. (/home// or /Users// and / or whatever the folder you want to store the logs in) // I do not recommend sharing these logs with anyone, as they contain your DeviceId, AccountId, Serial No., and much more about your Wii console. - fs.writeFileSync("LOOK ABOVE FOR INSTRUCTIONS" + new Date().toString() + ".txt", req.body); + var fileName = new Date().toString() + ".txt" + fs.writeFileSync("Your Directory" + fileName, req.body); + console.log("\nDone! Log should be where you put the directory"); res.status(200).send('got log!
go back to shop'); }); app.get("/ecs/log", function(req, res) { res.status(200).send('hi
go back to shop'); }) - +app.get("/trace", function(req, res) { + console.log("Trace message: " + decodeURIComponent(req.query.msg)); + res.status(200).send("Got trace!") +}) app.listen(8082, function() { console.log('server listening on port 8082') })