hacker.js: add logic to copy job script to server.

[?]
Sep 7, 2020, 7:59 AM
PUMDUVMZOIZW5AREIFGE6ONJSN6AYTOYMM3IVKIFWUBEUHKBG3LAC

Dependencies

  • [2] JS52JD4Q weaken_manager.js: add. lib_server_used.js: move to lib_ram_script. lib_ps: delete. main.js, hacker.js, lib_ram_script.js: refactor. README.md: update.
  • [3] 2BKHJI2S init
  • [4] 2WOLGB42 README.md: update. kill.js: fix argument parser. lshw.js: add `-p` option. increase information given. main.js: fix error message. set saner defaults. hacker.js: split some functions into "lib_time.js" and "lib_score.js". ram.js: fix.
  • [5] BKG7YVUV main.js, hacker.js, servers.js, ram.js: refactor.
  • [6] SXEJJKPI executables: add `--help` flag. hacker.js: change scheduling logic. refactor. kill.js: allow handling more than one server or script at a time. cyclic_weaken.js: add. README.md: update.
  • [7] ZNH2OJ3C hacker.js, main.js: added continuous scheduling mode. README.md: update. credits to Mei for helping me figure out how to time the continuous mode and to Kozd for making `sort_by` work with methods.
  • [8] ZRPOW4ER hacker.js, lib_time.js: supress error messages. hacker.js: use `getBitNodeMultipliers`. lib_time.js: use `getStats`. README.md: update.
  • [9] JGNALSUQ add "cyclic_weaken.js" feature. hacker.js, main.js, libs: refactor. README.md: update.
  • [10] P6ZJC2SH hacker.js: normalise factors used in server scoring function.

Change contents

  • replacement in sbin/hacker.js at line 1
    [3.14850][3.11:42]()
    /* hacker.js - 12.75GB - TODO:
    [3.14850]
    [3.11]
    /* hacker.js - 13.35GB - TODO:
  • edit in sbin/hacker.js at line 885
    [2.31184]
    [2.31184]
    // copies script in current server to a target server
    const void_copy_script_to = function (ns, string_script, string_server_used) {
    ns.scp(
    string_script,
    ns.getHostname(),
    string_server_used
    );
    }
  • edit in sbin/hacker.js at line 906
    [2.31461]
    [2.31461]
    void_copy_script_to(
    ns,
    object_job.string_script,
    object_job.string_server_used
    );