main.js: fix regression. lib_ls.js: refactor.
[?]
May 17, 2020, 9:58 AM
XUZPBRE6E2XZPQVFLLZ24H6U42SSBJPKCMSCEUVBVXGWXBIUSB3QCDependencies
- [2]
IFVY3INIcontracts.js: add --verbose and --check-delay options. README.md: update. - [3]
JS52JD4Qweaken_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. - [4]
SLSWBNYTadded ram utilisation logic to `ram.js` and `servers.js`. split and refactored redundant code into separate library files. - [5]
SXEJJKPIexecutables: 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. - [6]
ZVQK2652executables: fix help message. - [7]
JGNALSUQadd "cyclic_weaken.js" feature. hacker.js, main.js, libs: refactor. README.md: update. - [8]
FCJA5EXScontracts.js: add. README.md: update. - [9]
Y5OWMCQRall: remove unecessary uses of `exec`. refactor. main.js: add RAM reservation logic. lib_ram.js: renamed to lib_ram_server.js. README.js: update. - [10]
FBAPT2WWexecutables: dynamically load help messages. lshw.js, main.js: add options to change score correction method and score factor multipliers. README.md: update. - [11]
2BKHJI2Sinit - [12]
AXGQ7FMLsplit and refactor hacking logic to "hacker.js" and argument parsing and script execution logic to "main.js". update "README.md". - [13]
HSNSECD5all: refactor. main.js: fix call to `void_kill_script_named_server_named`. - [14]
ZRPOW4ERhacker.js, lib_time.js: supress error messages. hacker.js: use `getBitNodeMultipliers`. lib_time.js: use `getStats`. README.md: update. - [15]
EYKBOK3Ooptimised the scheduling logic by ensuring that cycles start and finish at minimum security of target.
Change contents
- replacement in lib/lib_ls.js at line 6
string_substringsubstring - replacement in lib/lib_ls.js at line 8[4.3816]→[4.3733784:3733845](∅→∅),[4.3733784]→[4.3733784:3733845](∅→∅),[4.3733845]→[4.1789:1825](∅→∅),[4.1825]→[4.3817:3825](∅→∅),[4.3733877]→[4.3817:3825](∅→∅),[4.3825]→[4.9483:9595](∅→∅),[4.9595]→[4.3934:3940](∅→∅),[4.3934]→[4.3934:3940](∅→∅),[4.3940]→[4.9596:9663](∅→∅),[4.9663]→[4.3941:3987](∅→∅),[4.3734050]→[4.3941:3987](∅→∅),[4.3987]→[4.1826:1875](∅→∅)
const array_files_in_server = ns.ls(string_server_source);let array_files_with_string = [];for (let integer_index_file = 0;integer_index_file < array_files_in_server.length;++integer_index_file) {const string_file = array_files_in_server[integer_index_file];string_file.includes(string_substring) &&array_files_with_string.push(string_file);const array_files_with_string = [];const string_type_substring = typeof substring;switch (string_type_substring) {case "object":for (let integer_index_substring = 0;integer_index_substring < substring.length;++integer_index_substring) {const string_substring = substring[integer_index_substring];array_files_with_string.push(ns.ls(string_server_source, string_substring));}break;case "string":array_files_with_string.push(ns.ls(string_server_source, substring));break;default:const string_message_error = `Invalid input "${substring}" of type ${string_type_substring}.`;throw (ns.tprint(`ERROR: ${string_message_error}`), new Error(string_message_error)); - replacement in bin/main.js at line 57
boolean_print_help = !1boolean_print_help: !1, - edit in bin/main.js at line 169
// script extensionsarray_script_extensions: [".js",".ns",".script"], - replacement in bin/main.js at line 200
throw (ns.tprint(`ERROR: ${integer_threads_nop}`), new Error(string_message_error));throw (ns.tprint(`ERROR: ${string_message_error}`), new Error(string_message_error)); - replacement in bin/main.js at line 555
for (let integer_index_file = 0;integer_index_file < array_files.length;++integer_index_file)ns.scp(array_files[integer_index_file],string_source,array_servers[integer_index_server]);ns.scp(array_files,string_source,array_servers[integer_index_server]); - replacement in bin/main.js at line 564
const string_host = ns.getHostname(),array_script_extensions = [".js", ".ns", ".script"];for (let integer_index_extension = 0;integer_index_extension < array_script_extensions.length;++integer_index_extension) {const string_extension = array_script_extensions[integer_index_extension];void_copy_files_to_servers(const string_host = ns.getHostname();void_copy_files_to_servers(ns,array_get_files_with_string( - replacement in bin/main.js at line 569
array_get_files_with_string(ns, string_host, string_extension),string_host);}string_host,object_get_constants().array_script_extensions),string_host); - replacement in bin/main.js at line 586
const object_script = array_scripts[integer_index_script],constobject_script = array_scripts[integer_index_script], - replacement in bin/cp.js at line 1
// cp.js - 2.65GB/* cp.js - 2.65GB - TODO:* set default to silent* add verbose option*/ - replacement in bin/cp.js at line 55[4.14790]→[4.19707:19715](∅→∅),[4.19707]→[4.19707:19715](∅→∅),[4.19715]→[4.14791:14913](∅→∅),[4.14913]→[4.19818:19824](∅→∅),[4.19818]→[4.19818:19824](∅→∅),[4.19824]→[4.14914:14986](∅→∅),[4.14986]→[4.19889:19952](∅→∅),[4.19889]→[4.19889:19952](∅→∅)
for (let integer_index_substring = 0;integer_index_substring < array_substrings.length;++integer_index_substring) {const string_substring = array_substrings[integer_index_substring];void_copy_files_with_to_current(ns, string_substring);}void_copy_files_with_to_current(ns, array_substrings); - replacement in bin/cp.js at line 82
string_file_to_copyfiles_to_copy - edit in bin/cp.js at line 84
const string_input = JSON.stringify(files_to_copy); - replacement in bin/cp.js at line 86
ns.scp(string_file_to_copy, string_server_source, ns.getHostname());ns.scp(files_to_copy, string_server_source, ns.getHostname()); - replacement in bin/cp.js at line 88
`Copied the file "${string_file_to_copy}" located in the server "${string_server_source}".``Copied "${string_input}" located in the server "${string_server_source}".` - replacement in bin/cp.js at line 93
`${error}\nAttempted to copy the file "${string_file_to_copy}" located in the server "${string_server_source}".``${error}\nAttempted to copy "${string_input}" located in the server "${string_server_source}".` - replacement in bin/cp.js at line 99
const void_copy_files_with_to_current = function (ns, string_substring) {const void_copy_files_with_to_current = function (ns, substring) { - replacement in bin/cp.js at line 106[4.20531]→[4.15496:15566](∅→∅),[4.15566]→[4.2152:2209](∅→∅),[4.2209]→[4.20651:20737](∅→∅),[4.20651]→[4.20651:20737](∅→∅),[4.20737]→[4.15567:15683](∅→∅),[4.15683]→[4.20850:20858](∅→∅),[4.20850]→[4.20850:20858](∅→∅),[4.20858]→[4.15684:15759](∅→∅),[4.15759]→[4.3804720:3804801](∅→∅),[4.3804720]→[4.3804720:3804801](∅→∅)
const string_server_source = array_servers[integer_index_server],array_files_to_copy = array_get_files_with_string(ns,string_server_source,string_substring);for (let integer_index_file = 0;integer_index_file < array_files_to_copy.length;++integer_index_file) {const string_file_to_copy = array_files_to_copy[integer_index_file];void_copy_to_current(ns, string_server_source, string_file_to_copy);}conststring_server_source = array_servers[integer_index_server];void_copy_to_current(ns, string_server_source, array_get_files_with_string(ns,string_server_source,substring)); - replacement in bin/contracts.js at line 422
If set, displays messages regarding succesful attempts (in addition to standard failed attempt messages).If set, displays messages regarding successful attempts (in addition to standard failed attempt messages). - replacement in README.md at line 181
* If set, displays messages regarding succesful attempts (in addition to standard failed attempt messages).* If set, displays messages regarding successful attempts (in addition to standard failed attempt messages).