From f06da0bee03a5868efd242cbfa38e2f432fb32df Mon Sep 17 00:00:00 2001 From: Ocarinaoftime <89474990+Ocarinaoftime@users.noreply.github.com> Date: Wed, 2 Oct 2024 11:06:44 -0400 Subject: [PATCH] Create main.js --- main.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 main.js diff --git a/main.js b/main.js new file mode 100644 index 0000000..2ec94ac --- /dev/null +++ b/main.js @@ -0,0 +1,20 @@ +var express = require('express'); +var bodyParser = require('body-parser'); +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); + // 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); + 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.listen(8082, function() { + console.log('server listening on port 8082') +})