File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ let http = require("http")
77let crypto = require ( "crypto" )
88
99if ( 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 ) ;
Original file line number Diff line number Diff line change 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 >
You can’t perform that action at this time.
0 commit comments