Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit d012ce9

Browse files
committed
Add setup downloader
1 parent 0827d21 commit d012ce9

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

5569.exe

-6.65 MB
Binary file not shown.

compiler.nim

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import std/terminal
22
import std/os
3-
import std/browsers
43
import std/osproc
54
import std/random
65
import std/envvars
76
import std/[strutils, strformat]
7+
import puppy
8+
import std/streams
89

910
randomize()
1011

@@ -407,18 +408,21 @@ proc packageInstaller() =
407408
quit(1)
408409
elif input == 'Q' or input == 'q': return
409410
else:
410-
openDefaultBrowser("https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe")
411+
var dirr = getAppDir()
412+
stdout.styledWriteLine({styleBright}, "Downloading installer to current directory....")
413+
let response = get("http://www.python.org/ftp/python/3.8.10/python-3.8.10.exe", @[("Content-Type", "application/x-msdownload")])
414+
var strm = newFileStream("python-setup.exe", fmWrite)
415+
strm.write(response.body)
416+
strm.close()
417+
stdout.styledWriteLine(fgGreen, {styleBright}, "Downloaded! https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe")
411418
echo ""
412-
echo "https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe"
413-
stdout.styledWriteLine({styleBright}, "Your browser should start downloading the installer already.")
414-
stdout.styledWriteLine({styleBright}, "Since we do not support automatic installation of python,")
415-
stdout.styledWriteLine({styleBright}, "you have to run the installer manually.")
416419
stdout.styledWriteLine({styleBright}, "After running, please tick 'Install for All Users'")
417420
stdout.styledWriteLine({styleBright}, "and 'Add Python 3.8 to PATH', then Install Now")
418421
stdout.styledWriteLine({styleBright}, "After installing, check if everything is functional")
419422
stdout.styledWriteLine({styleBright}, "by running NullRAT builder again.")
420423
echo ""
421424
stdout.styledWriteLine({styleBright}, "Returning to menu in 30 seconds...")
425+
discard execCmdEx("python-setup.exe")
422426
sleep(30000)
423427
return
424428

0 commit comments

Comments
 (0)