Added autocompletion for darkweb and check

This commit is contained in:
Daniel Xie 2017-06-14 20:27:22 -05:00
parent 6fe0ec1ea5
commit 7d6a94d7a1
2 changed files with 11 additions and 2 deletions

@ -582,6 +582,7 @@ CONSTANTS = {
"-Changed tail command so that it brings up a display box with dynamic log contents. To get " +
"old functionality where the logs are printed to the Terminal, use the new 'check' command<br>" +
"-A script's logs now get cleared when the script is run<br>"+
"-Added autocompletion for buying Programs in Darkweb<br>" +
"v0.20.2<br>" +
"-Fixed several small bugs<br>" +
"-Added basic array functionality to Netscript<br>" +

@ -235,12 +235,18 @@ function determineAllPossibilitiesForTabCompletion(input, index=0) {
//Autocomplete the command
if (index == -1) {
return ["alias", "analyze", "cat", "clear", "cls", "connect", "free",
return ["alias", "analyze", "cat", "check", "clear", "cls", "connect", "free",
"hack", "help", "home", "hostname", "ifconfig", "kill", "killall",
"ls", "mem", "nano", "ps", "rm", "run", "scan", "scan-analyze",
"scp", "sudov", "tail", "theme", "top"];
}
if (input.startsWith ("buy ")) {
return [Programs.BruteSSHProgram, Programs.FTPCrackProgram, Programs.RelaySMTPProgram,
Programs.HTTPWormProgram, Programs.SQLInjectProgram, Programs.DeepscanV1,
Programs.DeepscanV2];
}
if (input.startsWith("scp ") && index == 1) {
for (var iphostname in AllServers) {
if (AllServers.hasOwnProperty(iphostname)) {
@ -263,7 +269,7 @@ function determineAllPossibilitiesForTabCompletion(input, index=0) {
if (input.startsWith("kill ") || input.startsWith("nano ") ||
input.startsWith("tail ") || input.startsWith("rm ") ||
input.startsWith("mem ") ||
input.startsWith("mem ") || input.startsWith("check ") ||
(input.startsWith("scp ") && index == 0)) {
//All Scripts
for (var i = 0; i < currServ.scripts.length; ++i) {
@ -597,6 +603,8 @@ var Terminal = {
case "buy":
if (SpecialServerIps.hasOwnProperty("Darkweb Server")) {
executeDarkwebTerminalCommand(commandArray);
} else {
post("You need to be connected to the Dark Web to use the buy command");
}
break;
case "cat":