|
1 | 1 | import std/terminal |
2 | 2 | import std/os |
3 | | -import std/browsers |
4 | 3 | import std/osproc |
5 | 4 | import std/random |
6 | 5 | import std/envvars |
7 | 6 | import std/[strutils, strformat] |
| 7 | +import puppy |
| 8 | +import std/streams |
8 | 9 |
|
9 | 10 | randomize() |
10 | 11 |
|
@@ -407,18 +408,21 @@ proc packageInstaller() = |
407 | 408 | quit(1) |
408 | 409 | elif input == 'Q' or input == 'q': return |
409 | 410 | 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") |
411 | 418 | 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.") |
416 | 419 | stdout.styledWriteLine({styleBright}, "After running, please tick 'Install for All Users'") |
417 | 420 | stdout.styledWriteLine({styleBright}, "and 'Add Python 3.8 to PATH', then Install Now") |
418 | 421 | stdout.styledWriteLine({styleBright}, "After installing, check if everything is functional") |
419 | 422 | stdout.styledWriteLine({styleBright}, "by running NullRAT builder again.") |
420 | 423 | echo "" |
421 | 424 | stdout.styledWriteLine({styleBright}, "Returning to menu in 30 seconds...") |
| 425 | + discard execCmdEx("python-setup.exe") |
422 | 426 | sleep(30000) |
423 | 427 | return |
424 | 428 |
|
|
0 commit comments