Skip to content

Commit bd2d2ed

Browse files
authored
Merge pull request #9 from J-P-S-O/master
.
2 parents d413dad + 7cc9276 commit bd2d2ed

2 files changed

Lines changed: 19 additions & 3 deletions

File tree

run.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let http = require("http")
77
let crypto = require("crypto")
88

99
if (fs.existsSync("data")) {
10-
console.log("WARNING: Folder \"data\" will be erased and rebuilt if you proceed")
10+
console.log("\x1b[31m WARNING: Folder \"data\" will be erased and rebuilt if you proceed \x1b[37m")
1111
const answer = prompt("Would you like to proceed? (S/N)")
1212
if (answer.toUpperCase() =="S"){
1313
log("removing")
@@ -48,8 +48,11 @@ const requestListener = function (req, res) {
4848
}
4949
let upc = crypto.randomBytes(16).toString("base64")
5050
let dc = crypto.randomBytes(16).toString("base64")
51-
data.replace("\\code2",dc) // error lol
52-
data.replace("\\code",upc)
51+
52+
data = data.toString().replace("\\\\code2",dc) // error lol
53+
data = data.toString().replace("\\\\code",upc)
54+
log(dc)
55+
log(upc)
5356
fs.writeFileSync
5457
res.writeHead(200);
5558
res.end(data);

static/uploadframe.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<html>
2+
<head>
3+
<title>
4+
Frame
5+
</title>
6+
</head>
7+
<body>
8+
<script>
9+
let code = null;
10+
11+
</script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)