botnet.js: refactor.
[?]
Sep 14, 2020, 6:58 PM
7FO2D5SSE3BHZFJU3PU2PEOIMDS6HSUVYAPVZQ5QPCPA32DF56XQCDependencies
- [2]
TDBVUKLOcache some calculations which should increase performance. - [3]
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. - [4]
HSNSECD5all: refactor. main.js: fix call to `void_kill_script_named_server_named`. - [5]
2BKHJI2Sinit
Change contents
- replacement in sbin/botnet.js at line 6
const float_period_check = 1e3 * ns.args[0];constfloat_period_check = 1e3 * ns.args[0],array_exploits = [ns.brutessh,ns.ftpcrack,ns.relaysmtp,ns.httpworm,ns.sqlinject],array_exploits_length = array_exploits.length; - replacement in sbin/botnet.js at line 27
void_open_ports_try(ns, string_server_unrooted);for (let integer_index_exploit = 0;integer_index_exploit < array_exploits_length;++integer_index_exploit) {try {array_exploits[integer_index_exploit](string_server_unrooted);} catch (error) {ns.print(JSON.stringify(error));}} - edit in sbin/botnet.js at line 45[3.56523]→[3.56523:56527](∅→∅),[3.56527]→[3.7282:7549](∅→∅),[3.7549]→[2.3284:3388](∅→∅),[2.3388]→[3.7598:7606](∅→∅),[3.7598]→[3.7598:7606](∅→∅),[3.7606]→[3.3441:3476](∅→∅),[3.3476]→[2.3389:3440](∅→∅),[2.3440]→[3.3527:3555](∅→∅),[3.3527]→[3.3527:3555](∅→∅),[3.3555]→[3.7708:7714](∅→∅),[3.7708]→[3.7708:7714](∅→∅),[3.3631]→[3.7785:7795](∅→∅),[3.7785]→[3.7785:7795](∅→∅),[3.7795]→[2.3441:3508](∅→∅),[2.3508]→[3.7848:7915](∅→∅),[3.7848]→[3.7848:7915](∅→∅)
}};// functionsconst array_get_exploits = function (ns) {return [ns.brutessh,ns.ftpcrack,ns.relaysmtp,ns.httpworm,ns.sqlinject];};// tries to open ports of serverconst void_open_ports_try = function (ns, string_server_target) {constarray_exploits = array_get_exploits(ns),array_exploits_length = array_exploits.length;for (let integer_index_exploit = 0;integer_index_exploit < array_exploits_length;++integer_index_exploit) {try {array_exploits[integer_index_exploit](string_server_target);} catch (error) {ns.print(JSON.stringify(error));}