SXEJJKPIZE6AFCHQ32SROLWQUP733MRJZXNAR7OR37VVSRJIFFJQC 6TF4T3E2TNJENBEZ2O6FCNF6XTQPPZ7WM2GMMH453BWXE7PKZUMQC G7YVCY6HM6W46JYZWU6HY4VO4SQCHBP73LW2RTI2LPNRQD2TNKCAC ZRPOW4ERZN63I6GSUF3DGU77MI4DVWBHOZQAMGJO57YVSYJ4CUDAC HSNSECD5D3ACWDKZNIEV7RZZ54IE5K33WS3DR37ABHM5QP5JJPIAC 2BKHJI2SJ3VXTFBK2BWNN3I3BDNMUU5YTJGKTQCOXV66VVRHCGKAC P6ZJC2SHPVYCBRAQPEF4727M5GSKSI7WSW3HBPAXFR7D6CGZUSYQC 2WOLGB42T4EO7ZKLA5KFUYWVPTR6I3ET3FPJT4BSJFL43RRFRUBAC BKG7YVUVECDMXYJHUCUG2OULA4MSHZURNSDR7PYPPCSFM5ZV326QC Y5OWMCQRLGQ56HMM53HR6CVZEMAHOEKDYMFLBDEQOJ4HLUJL7HUAC IVSW4A6P6V4K5ZCXMOB4ENW45U6LNKX7HD7AYTCHNRBGC64FK5IAC AXGQ7FMLMADYBZWHFQPYL6Q4W5G6AE4GTYTWAON4MIJRI7G6FE4AC 7SRULDRFXA6ZZUEXRPCDO7NIUJDREKYI3ESUYTOXMSPVMORDJXIQC DJDWBCCQHQRKHGRKKQ32QY3WDEM7EKDDQ2YQLSSCS7HZTLHDRCFQC MKHG4OQBVXNOJFRUKKI2KN7VXJHXDWZUUYKGF22TKTBYEUEFCC5AC VMXI7PS4GFDOWPFLHQ7TYKJ5K3K7FXNPJCBEVYHTTRN7YB5ZHEQAC SLSWBNYTIFKBFLKXZTMONGDMEOHSOOCOSU4KVJCONZG2DK3BBIUQC NQ22FUSWN6CBJKJ5H7UV5N2KEXBIXVNQDNL2EK6UJ3E7RFLWNVDQC 3NFCZ6IPQPUCWANJN5WMUHUCHEQN7U5HZXMHDKVC6V6HXA3FG5YQC 4ACCU75NFJ4ZD5CMHBBYCFLBWL2XQH4RS65FTR4JDJPBHTABYJZAC CJBGAILAK7G3WXYUBNUZMUMM3U5CPHWVK6ZAJWYBL4IOB5SZN32AC 6MBUKAG6VK6XXGRSER273IP2R35P3C5K3KOY4QVSZXEOYD3H4WRAC HLC2L3NJJSZLGSQ7JN6CTRE4YALVPLQSADZP3MDNLGB7BWPPH22QC RWMZ7DVLOVPLR4FCIAVSABA5OESYUIEQ2OOZUYNPCNFEBYK5627AC BZ6FC2BTR7M7T6KQX5OJEFY4B3OWAKCOALYOF7GYBXZ4ZNSGSCYQC FA3U4WUJ3YT2G2WIAXBHEZ4O4RWXX55BBFYQKODHUMF7I6Z37XUAC * add a way to be able to target more than one server at a time.
* add a function that will make and run a new schedule whilst there is already one running such that the newer schedule continues right after the old one finishes which would circumvent the down time that currently occurs after a schedule finishes running.* add a function that grinds XP by running cyclic weaken on a server using the remaining ram* remove unecessary cloning/copying* add a way to be able to target more than one server at a time?
* Maybe add functionality that allows on-the-fly hot loading of settings from a file.* add a job cap thing that prevents running more jobs if the first worker in a cycle finishes. add a thing to worker script that writes to a file (or to `window`) its identifier, when it started and when it finishes. add a padding optimiser that detects when tail collision occurs and increases padding each cycle if it does occur, and decreases it by half of how much it increases everytime no tail collision occurs* do we need to Add delay between each script execution?
* add a job cap thing that prevents running more jobs if the first worker in a cycle finishes. add a thing to worker script that writes to a file (or to `window`) its identifier, when it started, and when it finishes. add a padding optimiser that detects when tail collision occurs and increases padding each cycle if it does occur, and decreases it by half of how much it increases everytime no tail collision occurs* add functionality that allows on-the-fly hot loading of settings from a file?
import {float_get_server_ram_free,array_get_servers_rooted_sorted_by_ram,} from "lib_ram_server.js";import {float_get_time_hack,float_get_time_grow,float_get_time_weaken,} from "lib_time.js";import { boolean_can_server_run_script_threads } from "lib_ram_script.js";import {float_get_server_score,array_get_servers_hackable,} from "lib_score.js";import { boolean_array_scripts_any_running } from "lib_ps.js";
const object_get_constants = function(ns) {const object_get_bitnode_multipliers = function(ns) {
import {float_get_server_ram_total,float_get_server_ram_used,array_get_servers_useable} from "lib_ram_server.js";import { array_get_servers_hackable } from "lib_score.js";import {float_get_time_hack,float_get_time_grow,float_get_time_weaken,} from "lib_time.js";import {float_get_server_score,} from "lib_score.js";import { boolean_array_scripts_any_running } from "lib_ps.js";// https://stackoverflow.com/a/54157459const object_get_clone = function (object_original) {const object_serialised_deserialised = JSON.parse(JSON.stringify(object_original)),object_merged = Object.assign({}, object_original);return (Object.assign(object_merged, object_serialised_deserialised), object_merged);};const array_get_clone = function (array_original) {const array = [];for (let integer_index_element = 0;integer_index_element < array_original.length;++integer_index_element) {const element = array_original[integer_index_element];switch (typeof element) {case "object":// fall-throughcase "function":array.push(object_get_clone(element));break;default:array.push(element);}}return array;};const object_get_constants = function (ns) {const object_get_bitnode_multipliers = function (ns) {
-1 === array_servers.indexOf(array_scan_results[integer_indices_1]) &&array_servers.push(array_scan_results[integer_indices_1]);
-1 === array_servers.indexOf(array_scan_results[integer_index_scan_result]) &&array_servers.push(array_scan_results[integer_index_scan_result]);
// return array of rooted servers that have required hacking levels <= current hacking level, growth rates > 0 and max cash > 0export const array_get_servers_hackable = function (ns) {const array_servers_rooted = array_get_servers_rooted(ns);let array_servers_hackable = [];for (let integer_indices_0 = 0;integer_indices_0 < array_servers_rooted.length;++integer_indices_0) {const string_server = array_servers_rooted[integer_indices_0];ns.getHackingLevel() > ns.getServerRequiredHackingLevel(string_server) &&ns.getServerMaxMoney(string_server) > 0 &&ns.getServerGrowth(string_server) > 0 &&array_servers_hackable.push(string_server);}return array_servers_hackable;};
// return array of rooted servers that have required hacking levels <= current hacking level, growth rates > 0 and max cash > 0export const array_get_servers_hackable = function (ns) {const array_servers_rooted = array_get_servers_rooted(ns);let array_servers_hackable = [];for (let integer_index_server = 0;integer_index_server < array_servers_rooted.length;++integer_index_server) {const string_server = array_servers_rooted[integer_index_server];ns.getHackingLevel() > ns.getServerRequiredHackingLevel(string_server) &&ns.getServerMaxMoney(string_server) > 0 &&ns.getServerGrowth(string_server) > 0 &&array_servers_hackable.push(string_server);}return array_servers_hackable;};
ns.hasRootAccess(array_servers[integer_indices_0]) &&array_servers_rooted.push(array_servers[integer_indices_0]);
ns.hasRootAccess(array_servers[integer_index_server]) &&array_servers_rooted.push(array_servers[integer_index_server]);
ns.hasRootAccess(array_servers[integer_indices_0]) ||array_servers_unrooted.push(array_servers[integer_indices_0]);
ns.hasRootAccess(array_servers[integer_index_server]) ||array_servers_unrooted.push(array_servers[integer_index_server]);
};// returns an array of rooted servers that have ram > 0export const array_get_servers_useable = function (ns) {const array_servers_rooted = array_get_servers_rooted(ns);let array_servers_useable = [];for (let integer_index_server_rooted = 0;integer_index_server_rooted < array_servers_rooted.length;++integer_index_server_rooted) {const string_server_rooted =array_servers_rooted[integer_index_server_rooted];float_get_server_ram_total(ns, string_server_rooted) > 0 &&array_servers_useable.push(string_server_rooted);}return array_servers_useable;
* use the same server choosing logic used in hacker.js for picking which server to run helper scripts on* figure out a better way for this to run "hacker.js"* Maybe make a cache script that saves runtime constants like max money of servers to a cache file to potentially reduce RAM usage further.
import { boolean_can_server_run_script_threads } from "lib_ram_script.js";import { void_kill_script_named_server_named } from "lib_kill.js";import { boolean_script_running } from "lib_ps.js";import { object_parse_arguments } from "lib_minimist.js";// mainexport const main = async function(ns) {// variables// helper scriptsconst object_helpers = object_get_constants().object_helpers;// threads of "nop.js" required to reserve enough RAM to run "hacker.js"const integer_threads_nop = integer_get_threads_nop(ns, object_helpers.string_hacker, ns.getScriptName());// if this server doesn't have enough RAM to run "hacker.js", ejectif (!boolean_can_server_run_script_threads(ns,float_get_server_ram_free(ns, ns.getHostname()),object_helpers.string_nop,integer_threads_nop)) {const string_message_error = `This server has insufficient RAM to run "${object_helpers.string_nop}" with "${integer_threads_nop}" thread(s).`;throw (ns.tprint(`ERROR: ${integer_threads_nop}`), new Error(string_message_error));}// name of purchased serverslet string_servers_bought_name = "server";// maximum amount of jobs to execute per schedule, used to prevent using up too much IRL RAMlet integer_job_cap = 1000;// duration between each job used to prevent collisions between them to keep them in sequencelet float_padding_seconds = 0.5;// precision of the percentage to steal calculatorlet float_precision = 0.001;// the maximum percentage of cash that should be stolen from a serverlet float_steal_cap = 0.9;// time period used for checking the time in secondslet float_period_check_seconds = 10;// targetlet string_server_target = "";// ram utilisiation threshold. upgrade ram or buy or replace servers when reached.let float_ram_utilisation_threshold = 0.9;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>let array_helpers = [{file: object_helpers.string_ram,threads: 1,args: [float_period_check_seconds, float_ram_utilisation_threshold],},{file: object_helpers.string_servers,threads: 1,args: [float_period_check_seconds,string_servers_bought_name,float_ram_utilisation_threshold,],},{file: object_helpers.string_tor,threads: 1,args: [float_period_check_seconds],},{file: object_helpers.string_programs,threads: 1,args: [float_period_check_seconds,["BruteSSH.exe","FTPCrack.exe","relaySMTP.exe","HTTPWorm.exe","SQLInject.exe","DeepscanV1.exe","DeepscanV2.exe","Autolink.exe",],],},{file: object_helpers.string_botnet,threads: 1,args: [float_period_check_seconds],},];// flagsfor (const string_argument in object_arguments)if (object_arguments.hasOwnProperty(string_argument)) {const argument_value = object_arguments[string_argument];(("a" === string_argument && argument_value) ||("ram" === string_argument && !argument_value)) &&array_helpers.splice(integer_get_index_of_file(array_helpers, object_helpers.string_ram),1),(("e" === string_argument && argument_value) ||("servers" === string_argument && !argument_value)) &&array_helpers.splice(integer_get_index_of_file(array_helpers,object_helpers.string_servers),1),(("o" === string_argument && argument_value) ||("tor" === string_argument && !argument_value)) &&array_helpers.splice(integer_get_index_of_file(array_helpers, object_helpers.string_tor),1),(("g" === string_argument && argument_value) ||("programs" === string_argument && !argument_value)) &&array_helpers.splice(integer_get_index_of_file(array_helpers,object_helpers.string_programs),1),(("b" === string_argument && argument_value) ||("botnet" === string_argument && !argument_value)) &&array_helpers.splice(integer_get_index_of_file(array_helpers,object_helpers.string_botnet),1);}// main// reserve enough RAM for "hacker.js"ns.exec(object_helpers.string_nop, ns.getHostname(), integer_threads_nop);void_copy_scripts(ns);void_script_executor(ns, array_helpers);// kill "nop.js" scripts to free RAMvoid_kill_script_named_server_named(ns,ns.getHostname(),object_helpers.string_nop);ns.spawn(object_helpers.string_hacker,1,integer_job_cap,float_precision,float_steal_cap,float_padding_seconds,string_server_target);};// functionsconst object_get_constants = function() {return {// helper scriptsobject_helpers: {string_nop: "nop.js",string_hacker: "hacker.js",string_ram: "ram.js",string_servers: "servers.js",string_tor: "tor.js",string_programs: "programs.js",string_botnet: "botnet.js"}};};// return the difference in RAM requirements between two scriptsconst float_get_ram_difference = function(ns, string_script_0, string_script_1) {return ns.getScriptRam(string_script_0) - ns.getScriptRam(string_script_1);};// return the amount of threads of "nop.js" is required to make up RAM difference between two scriptsconst integer_get_threads_nop = function (ns,string_script_0,string_script_1) {return Math.ceil(float_get_ram_difference(ns, string_script_0, string_script_1) /ns.getScriptRam(object_get_constants().object_helpers.string_nop));};// copy all scripts from the current server to all serversconst void_copy_scripts = function (ns) {const string_host = ns.getHostname(),array_script_extensions = [".js", ".ns", ".script"];for (let integer_indices_0 = 0;integer_indices_0 < array_script_extensions.length;++integer_indices_0) {const string_extension = array_script_extensions[integer_indices_0];void_copy_files_to_servers(ns,array_get_files_to_copy(ns, string_host, string_extension),string_host);}};// returns the index of the scripts array which matches the filename inputconst integer_get_index_of_file = function (array_scripts, string_file) {for (let integer_indices_0 = 0;integer_indices_0 < array_scripts.length;++integer_indices_0) {const object_script = array_scripts[integer_indices_0],string_script_file = object_script.file;if (string_script_file === string_file) return integer_indices_0;}};// copies files to all rooted serversconst void_copy_files_to_servers = function (ns, array_files, string_source) {const array_servers = array_get_servers(ns);for (let integer_indices_0 = 0;integer_indices_0 < array_servers.length;++integer_indices_0)for (let integer_indices_1 = 0;integer_indices_1 < array_files.length;++integer_indices_1)ns.scp(array_files[integer_indices_1],string_source,array_servers[integer_indices_0]);};// runs scripts on any server that has enough available RAMconst void_script_executor = function (ns, array_scripts) {const array_servers_rooted_sorted_by_ram = array_get_servers_rooted_sorted_by_ram(ns);for (let integer_indices_0 = 0;integer_indices_0 < array_scripts.length;++integer_indices_0) {const object_script = array_scripts[integer_indices_0],string_file = object_script.file,float_ram = ns.getScriptRam(string_file),integer_threads = object_script.threads,array_arguments = object_script.args;if (!boolean_script_running(ns, string_file))// use servers with the biggest rams firstfor (let integer_indices_1 = array_servers_rooted_sorted_by_ram.length - 1;integer_indices_1 >= 0;--integer_indices_1) {const string_server_used =array_servers_rooted_sorted_by_ram[integer_indices_1];if (float_get_server_ram_free(ns, string_server_used) >=float_ram * integer_threads) {try {ns.exec(string_file,string_server_used,integer_threads,...array_arguments);} catch (error) {ns.tprint(JSON.stringify(error));}break;}0 === integer_indices_1 &&ns.tprint(`WARNING: Unable to find a server with sufficient RAM to run \"${string_file}\".`);}}};================================// argument parsing// optionsconst object_arguments = object_parse_arguments(ns.args);for (const string_argument in object_arguments)if (object_arguments.hasOwnProperty(string_argument)) {const argument_value = object_arguments[string_argument];switch (string_argument) {case "c":// fall-throughcase "check-delay":float_period_check_seconds = argument_value;break;case "d":// fall-throughcase "job-delay":float_padding_seconds = argument_value;break;case "i":// fall-throughcase "target":string_server_target = argument_value;break;case "j":// fall-throughcase "job-cap":integer_job_cap = argument_value;break;case "n":// fall-throughcase "server-name":string_servers_bought_name = argument_value;break;case "p":// fall-throughcase "precision":float_precision = argument_value;break;case "r":// fall-throughcase "ram-utilisation":float_ram_utilisation_threshold = argument_value;break;case "s":// fall-throughcase "steal-cap":float_steal_cap = argument_value;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
let integer_indices_0 = 0;integer_indices_0 < array_servers.length;++integer_indices_0
let integer_index_server = 0;integer_index_server < array_servers.length;++integer_index_server
const void_print_information = function (ns, string_server, integer_precision) {const float_cash_max = ns.getServerMaxMoney(string_server);const float_cash_current = ns.getServerMoneyAvailable(string_server);const float_security_minimum = ns.getServerMinSecurityLevel(string_server);const float_security_current = Math.round(ns.getServerSecurityLevel(string_server)
const void_print_help = function (ns,integer_precision) {ns.tprint(`DESCRIPTIONDisplay information about one or more servers.Optionally, display the information at regular intervals.USAGErun lshw.js [OPTIONS ...] <ARGUMENT [ARGUMENT ...]>ARGUMENT = Server to display the information about.OPTIONS-d, --delay <SECONDS>SECONDS = The duration of delay between update, in seconds. Should be a floating-point number >= 0.001. By default, the script will only display server information once, unless this option is manually set.-p, --precision <INTEGER>INTEGER = The decimal places to display floating point values with. Should be an integer >= 0. Defaults to ${integer_precision}.FLAGS-h, --helpDisplays this message then exits.`
const array_ram = ns.getServerRam(string_server);const float_ram_total = array_ram[0];const float_ram_used = array_ram[1];const float_ram_free = array_ram[0] - array_ram[1];const string_server_information =
};const void_print_information = function (ns,string_server,integer_precision) {constfloat_cash_max = ns.getServerMaxMoney(string_server),float_cash_current = ns.getServerMoneyAvailable(string_server),float_security_minimum = ns.getServerMinSecurityLevel(string_server),float_security_current = ns.getServerSecurityLevel(string_server),array_ram = ns.getServerRam(string_server),float_ram_total = array_ram[0],float_ram_used = array_ram[1],float_ram_free = array_ram[0] - array_ram[1],string_server_information =
// kill.js - 2.55GB - TODO:// * maybe implement a loop that repeats logic until all appropriate scripts have actually been killed.
/* kill.js - 2.55GB - TODO:* maybe implement a loop that repeats logic until all appropriate scripts have actually been killed.*/
const void_print_help = function (ns) {ns.tprint(`DESCRIPTIONKill all running scripts.Optionally, kill only named scripts instead.Optionally, kill only scripts on named servers instead.Optionally, kill only named scripts on named servers instead.USAGErun kill.js [FLAGS ...] [OPTIONS ...]OPTIONS-c, --script <SCRIPT>SCRIPT = The name of a script to kill.-e, --server <SERVER>SERVER = The name of a server on which scripts will be killed.FLAGS-h, --helpDisplays this message then exits.`);};
const array_arguments = ns.args;
// argument parsingconst object_arguments = object_parse_arguments(ns.args);let array_substrings = [];for (const string_argument in object_arguments)if (object_arguments.hasOwnProperty(string_argument)) {const argument_value = object_arguments[string_argument];switch (string_argument) {case "h":// fall-throughcase "help":boolean_print_help = argument_value;break;case "_":"object" == typeof argument_value? array_substrings.push(...argument_value): array_substrings.push(argument_value);break;default:const string_message_error = `Unknown argument passed: "${string_argument}".`;throw (ns.tprint(`ERROR: ${string_message_error}`), new Error(string_message_error));}}// mainif (boolean_print_help)return void_print_help(ns);
const void_print_help = function (ns) {ns.tprint(`DESCRIPTIONCopy all files that contain particular substring(s) in their filenames from all servers to the current server.USAGErun cp.js [FLAGS ...] <ARGUMENT [ARGUMENT ...]>ARGUMENT = Substring contained in the names of files to be copied to the current server.FLAGS-h, --helpDisplays this message then exits.`);};
`run main.js [OPTIONS ...] [FLAGS ...]`#### OPTIONS`-c, --check-delay <SECONDS>`* SECONDS = The duration of delay between each main loop used in helper scripts, in seconds. Should be a floating-point number > 0. Defaults to 10.`-d, --job-delay <SECONDS>`* SECONDS = The duration of delay between each job, in seconds. Should be a floating-point number > 0. Defaults to 0.5.
`run main.js [FLAGS ...] [OPTIONS ...]`
`-i, --target <SERVER>`* SERVER = The server that should be targetted by the `weaken`, `grow` and `hack` functions. Should be a string. Defaults to choosing an optimal target using a scoring system based on the server's maximum cash, growth, required hacking level, and the player's current hacking level.`-j, --job-cap <CAP>`* CAP = The maximum amount of jobs to execute per schedule. Should be an integer > 0. Defaults to 1000.`-n, --server-name <NAME>`* NAME = The name to be used for purchased servers. Should be a string. Defaults to "server".`-p, --precision <PRECISION>`* PRECISION = A value used in determining how many cycles of bisection the binary search algorithm used for the percentage to steal calculator should use. Should be a floating point number > 0 <= 1. Values closer to 0 will result in greater precision in the calculation, but potentially longer run-times and compared to values closer to 1. Defaults to 0.001.`-r, --ram-utilisation <THRESHOLD>`* THRESHOLD = The botnet's ram utilisation threshold after which upgrades/replacements should be bought for servers and the RAM of "home". Should be a floating point number >= 0 <= 1. Values closer to 0 will result in attempting more frequent upgrades/replacements at the cost of less efficient RAM utilisation to cash spenditure ratios. Defaults to 0.9.`-s, --steal-cap <CAP>`* CAP = The maximum amount fraction of cash to steal from the target server per `hack` job. Should be an integer >= 0 <=1. Defaults to 0.9.
#### EXAMPLES`run main.js`* Runs the script using default values.`run main.js --job-cap 4000 -i "harakiri-sushi" -r 0.7 --steal-cap=0.5 -ao --no-botnet`* Runs the script with up to 4000 jobs, targetting "harakiri-sushi", only upgrading/replacing servers when at least 0.7 of your network's total RAM is being used, and stealing only up to 50% of harakiri-sushi's cash per "hack.js" job that finishes executing, whilst the remaining variables are set to defaults. The "ram.js", "tor.js" and "botnet.js" helper scripts are also prevented from starting.---### "kill.js" (2.55 GB)* Kill all running scripts.* Optionally, kill only named scripts instead.* Optionally, kill only scripts on named servers instead.* Optionally, kill only named scripts on named servers instead.
#### EXAMPLES`run kill.js`* Kills all running scripts.`run kill.js -c grow.js --script hack.js`* Kills all scripts named "grow.js" and "hack.js" on any servers that they are currently running on.`run kill.js -e home --server harakiri-sushi`* Kills all scripts currently running on the "home" and "harakiri-sushi" servers.`run kill.js -c grow.js --script hack.js -e home --server harakiri-sushi`* Kills all scripts named "grow.js" and "hack.js" currently running on the "home" and "harakiri-sushi" servers.---### "lshw.js" (7.25 GB)* Display information about one or more servers.* Optionally, display the information at regular intervals.#### USAGE`run lshw.js [OPTIONS ...] <ARGUMENT [ARGUMENT ...]>`* ARGUMENT = Server to display the information about.#### OPTIONS`-d, --delay <SECONDS>`* SECONDS = The duration of delay between update, in seconds. Should be a floating-point number >= 0.001. By default, the script will only display server information once, unless this option is manually set.`-p, --precision <INTEGER>`* INTEGER = The decimal places to display floating point values with. Should be an integer >= 0. Defaults to 2.
`-i, --target <SERVER>`
#### EXAMPLES`run lshw.js -d 1 --precision=4 home foodnstuff`
* SERVER = The server that should be targetted by the `weaken`, `grow` and `hack` functions. Should be a string. Defaults to choosing an optimal target using a scoring system based on the server's maximum cash, growth, required hacking level, and the player's current hacking level.
### "cp.js" (2.65 GB)* Copy all files that contain particular substring(s) in their filenames from all servers to the current server.#### USAGE`run cp.js <ARGUMENT [ARGUMENT ...]>`* ARGUMENT = Substring contained in the names of files to be copied to the current server.
`-n, --server-name <NAME>`
---
* PRECISION = A value used in determining how many cycles of bisection the binary search algorithm used for the percentage to steal calculator should use. Should be a floating point number > 0 <= 1. Values closer to 0 will result in greater precision in the calculation, but potentially longer run-times and compared to values closer to 1. Defaults to 0.01.
---
* THRESHOLD = The botnet's ram utilisation threshold after which upgrades/replacements should be bought for servers and the RAM of "home". Should be a floating point number >= 0 <= 1. Values closer to 0 will result in attempting more frequent upgrades/replacements at the cost of less efficient RAM utilisation to cash spenditure ratios. Defaults to 0.9.
## LicenseThis Work is distributed and dual-licensed under the terms of both the [MIT License](https://nest.pijul.com/nicoty/bitburner_scripts:master/4bb17ded7a86f7decd) and the [Apache License 2.0](https://nest.pijul.com/nicoty/bitburner_scripts:master/4bb17ded7a86f7de02).
`-s, --steal-cap <CAP>`
### ContributionUnless You explicitly state otherwise, any Contribution submitted for inclusion in the Work by You, as defined in the Apache License 2.0, shall be dual-licensed as above, without any additional terms or conditions.
* CAP = The maximum amount fraction of cash to steal from the target server per `hack` job. Should be an integer >= 0 <=1. Defaults to 0.9.