This commit is contained in:
Olivier Gagnon 2021-09-16 03:13:06 -04:00
parent 8e1d31423f
commit 34dda1f252
3 changed files with 400 additions and 254 deletions

@ -1,282 +1,428 @@
/* tslint:disable:max-line-length completed-docs variable-name*/ /* tslint:disable:max-line-length completed-docs variable-name*/
import { IMap } from "../types"; import { IMap } from "../types";
export const TerminalHelpText: string = export const TerminalHelpText: string[] = [
"Type 'help name' to learn more about the command 'name'<br><br>" + "Type 'help name' to learn more about the command ",
'alias [-g] [name="value"] Create or display Terminal aliases<br>' + "",
"analyze Get information about the current machine <br>" + 'alias [-g] [name="value"] Create or display Terminal aliases',
"backdoor Install a backdoor on the current machine <br>" + "analyze Get information about the current machine ",
"buy [-l/program] Purchase a program through the Dark Web<br>" + "backdoor Install a backdoor on the current machine ",
"cat [file] Display a .msg, .lit, or .txt file<br>" + "buy [-l/program] Purchase a program through the Dark Web",
"cd [dir] Change to a new directory<br>" + "cat [file] Display a .msg, .lit, or .txt file",
"check [script] [args...] Print a script's logs to Terminal<br>" + "cd [dir] Change to a new directory",
"clear Clear all text on the terminal <br>" + "check [script] [args...] Print a script's logs to Terminal",
"cls See 'clear' command <br>" + "clear Clear all text on the terminal ",
"connect [ip/hostname] Connects to a remote server<br>" + "cls See 'clear' command ",
"download [script/text file] Downloads scripts or text files to your computer<br>" + "connect [ip/hostname] Connects to a remote server",
"expr [math expression] Evaluate a mathematical expression<br>" + "download [script/text file] Downloads scripts or text files to your computer",
"free Check the machine's memory (RAM) usage<br>" + "expr [math expression] Evaluate a mathematical expression",
"hack Hack the current machine<br>" + "free Check the machine's memory (RAM) usage",
"help [command] Display this help text, or the help text for a command<br>" + "hack Hack the current machine",
"home Connect to home computer<br>" + "help [command] Display this help text, or the help text for a command",
"hostname Displays the hostname of the machine<br>" + "home Connect to home computer",
"ifconfig Displays the IP address of the machine<br>" + "hostname Displays the hostname of the machine",
"kill [script/pid] [args...] Stops the specified script on the current server <br>" + "ifconfig Displays the IP address of the machine",
"killall Stops all running scripts on the current machine<br>" + "kill [script/pid] [args...] Stops the specified script on the current server ",
"ls [dir] [| grep pattern] Displays all files on the machine<br>" + "killall Stops all running scripts on the current machine",
"lscpu Displays the number of CPU cores on the machine<br>" + "ls [dir] [| grep pattern] Displays all files on the machine",
"mem [script] [-t] [n] Displays the amount of RAM required to run the script<br>" + "lscpu Displays the number of CPU cores on the machine",
"mv [src] [dest] Move/rename a text or script file<br>" + "mem [script] [-t] [n] Displays the amount of RAM required to run the script",
"nano [file] Text editor - Open up and edit a script or text file<br>" + "mv [src] [dest] Move/rename a text or script file",
"ps Display all scripts that are currently running<br>" + "nano [file] Text editor - Open up and edit a script or text file",
"rm [file] Delete a file from the server<br>" + "ps Display all scripts that are currently running",
"run [name] [-t] [n] [args...] Execute a program or script<br>" + "rm [file] Delete a file from the server",
"scan Prints all immediately-available network connections<br>" + "run [name] [-t] [n] [args...] Execute a program or script",
"scan-analyze [d] [-a] Prints info for all servers up to <i>d</i> nodes away<br>" + "scan Prints all immediately-available network connections",
"scp [file] [server] Copies a file to a destination server<br>" + "scan-analyze [d] [-a] Prints info for all servers up to <i>d</i> nodes away",
"sudov Shows whether you have root access on this computer<br>" + "scp [file] [server] Copies a file to a destination server",
"tail [script] [args...] Displays dynamic logs for the specified script<br>" + "sudov Shows whether you have root access on this computer",
"theme [preset] | bg txt hlgt Change the color scheme of the UI<br>" + "tail [script] [args...] Displays dynamic logs for the specified script",
"top Displays all running scripts and their RAM usage<br>" + "theme [preset] | bg txt hlgt Change the color scheme of the UI",
"unalias [alias name] Deletes the specified alias<br>" + "top Displays all running scripts and their RAM usage",
"wget [url] [target file] Retrieves code/text from a web server<br>"; "unalias [alias name] Deletes the specified alias",
"wget [url] [target file] Retrieves code/text from a web server",
];
export const HelpTexts: IMap<string> = { export const HelpTexts: IMap<string[]> = {
alias: alias: [
'alias [-g] [name="value"] <br>' + 'alias [-g] [name="value"] ',
"Create or display aliases. An alias enables a replacement of a word with another string. " + " ",
"It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME " + "Create or display aliases. An alias enables a replacement of a word with another string. ",
"of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, " + "It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME ",
"you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following: <br><br>" + "of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, ",
'alias nuke="run NUKE.exe"<br><br>' + "you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following: ",
"Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. " + " ",
"It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For " + 'alias nuke="run NUKE.exe"',
"example, if the following alias was set: <br><br>" + " ",
'alias worm="HTTPWorm.exe"<br><br>' + "Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. ",
"and then you tried to run the following terminal command: <br><br>" + "It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For ",
"run worm<br><br>" + "example, if the following alias was set: ",
"This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted " + " ",
"anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag: <br><br>" + 'alias worm="HTTPWorm.exe"',
'alias -g worm="HTTPWorm.exe"<br><br>' + " ",
"Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command. <br><br>" + "and then you tried to run the following terminal command: ",
"Entering just the command 'alias' without any arguments prints the list of all defined aliases in the reusable form " + " ",
"'alias NAME=VALUE' on the Terminal. <br><br>" + "run worm",
"The 'unalias' command can be used to remove aliases.<br><br>", " ",
analyze: "This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted ",
"analze<br>" + "anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag: ",
"Prints details and statistics about the current server. The information that is printed includes basic " + " ",
"server details such as the hostname, whether the player has root access, what ports are opened/closed, and also " + 'alias -g worm="HTTPWorm.exe"',
"hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is " + " ",
"Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command. ",
" ",
"Entering just the command 'alias' without any arguments prints the list of all defined aliases in the reusable form ",
"'alias NAME=VALUE' on the Terminal. ",
" ",
"The 'unalias' command can be used to remove aliases.",
" ",
],
analyze: [
"analze",
" ",
"Prints details and statistics about the current server. The information that is printed includes basic ",
"server details such as the hostname, whether the player has root access, what ports are opened/closed, and also ",
"hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is ",
"available on the server, etc.", "available on the server, etc.",
backdoor: ],
"backdoor<br>" + backdoor: [
"Install a backdoor on the current machine, grants a secret bonus depending on the machine.<br>" + "backdoor",
"Requires root access to run.<br>", " ",
buy: "Install a backdoor on the current machine, grants a secret bonus depending on the machine.",
"buy [-l / program]<br>" + " ",
"Purchase a program through the Dark Web. Requires a TOR router to use.<br><br>" + "Requires root access to run.",
"If this command is ran with the '-l' flag, it will display a list of all programs that can be bought through the " + " ",
"dark web to the Terminal, as well as their costs.<br><br>" + ],
buy: [
"buy [-l / program]",
" ",
"Purchase a program through the Dark Web. Requires a TOR router to use.",
" ",
"If this command is ran with the '-l' flag, it will display a list of all programs that can be bought through the ",
"dark web to the Terminal, as well as their costs.",
" ",
"Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive.", "Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive.",
cat: ],
"cat [file]<br>" + cat: [
"Display message (.msg), literature (.lit), or text (.txt) files. Examples:<br><br>" + "cat [file]",
"cat j1.msg<br>" + " ",
"cat foo.lit<br>" + "Display message (.msg), literature (.lit), or text (.txt) files. Examples:",
" ",
"cat j1.msg",
" ",
"cat foo.lit",
" ",
"cat servers.txt", "cat servers.txt",
cd: ],
"cd [dir]<br>" + cd: [
"Change to the specified directory. Note that this works even for directories that don't exist. If you " + "cd [dir]",
"change to a directory that does not exist, it will not be 'created'. Examples:<br><br>" + " ",
"cd scripts/hacking<br>" + "Change to the specified directory. Note that this works even for directories that don't exist. If you ",
"cd /logs<br>" + "change to a directory that does not exist, it will not be 'created'. Examples:",
" ",
"cd scripts/hacking",
" ",
"cd /logs",
" ",
"cd ../", "cd ../",
check: ],
"check [script name] [args...]<br>" + check: [
"Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by " + "check [script name] [args...]",
"a space. Remember that a running script is uniquely " + " ",
"identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments: <br><br>" + "Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by ",
"run foo.script 1 2 foodnstuff<br><br>" + "a space. Remember that a running script is uniquely ",
"Then to run the 'check' command on this script you would have to pass the same arguments in: <br><br>" + "identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments: ",
" ",
"run foo.script 1 2 foodnstuff",
" ",
"Then to run the 'check' command on this script you would have to pass the same arguments in: ",
" ",
"check foo.script 1 2 foodnstuff", "check foo.script 1 2 foodnstuff",
clear: ],
"clear<br>" + clear: [
"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up " + "clear",
" ",
"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up ",
"and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'cls' command", "and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'cls' command",
cls: ],
"cls<br>" + cls: [
"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up " + "cls",
" ",
"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up ",
"and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'clear' command", "and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'clear' command",
connect: ],
"connect [hostname/ip]<br>" + connect: [
"Connect to a remote server. The hostname or IP address of the remote server must be given as the argument " + "connect [hostname/ip]",
"to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To " + " ",
"Connect to a remote server. The hostname or IP address of the remote server must be given as the argument ",
"to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To ",
"see which servers can be connected to, use the 'scan' command.", "see which servers can be connected to, use the 'scan' command.",
download: ],
"download [script/text file]<br>" + download: [
"Downloads a script or text file to your computer (like your real life computer).<br>" + "download [script/text file]",
"You can also download all of your scripts/text files as a zip file using the following Terminal commands:<br><br>" + " ",
"Download all scripts and text files: download *<br>" + "Downloads a script or text file to your computer (like your real life computer).",
"Download all scripts: download *.script<br>" + " ",
"Download all text files: download *.txt<br>", "You can also download all of your scripts/text files as a zip file using the following Terminal commands:",
expr: " ",
"expr [mathematical expression]<br>" + "Download all scripts and text files: download *",
"Evaluate a simple mathematical expression. Supports native JavaScript operators:<br>" + " ",
"+, -, /, *, **, %<br>" + "Download all scripts: download *.script",
"Example:<br>" + " ",
"expr 25 * 2 ** 10<br>" + "Download all text files: download *.txt",
" ",
],
expr: [
"expr [mathematical expression]",
" ",
"Evaluate a simple mathematical expression. Supports native JavaScript operators:",
" ",
"+, -, /, *, **, %",
" ",
"Example:",
" ",
"expr 25 * 2 ** 10",
" ",
"Note that letters (non-digits) are not allowed and will be removed from the input.", "Note that letters (non-digits) are not allowed and will be removed from the input.",
free: ],
"free<br>" + free: [
"Display's the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as " + "free",
" ",
"Display's the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as ",
"how much of it is being used.", "how much of it is being used.",
hack: ],
"hack<br>" + hack: [
"Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics<br>", "hack",
help: " ",
"help [command]<br>" + "Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics",
"Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief " + " ",
"description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print " + ],
"more detailed information about the Terminal command. Examples: <br><br>" + help: [
"help alias<br>" + "help [command]",
" ",
"Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief ",
"description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print ",
"more detailed information about the Terminal command. Examples: ",
" ",
"help alias",
" ",
"help scan-analyze", "help scan-analyze",
home: ],
"home<br>" + "Connect to your home computer. This will work no matter what server you are currently connected to.", home: [
hostname: "hostname<br>" + "Prints the hostname of the current server", "home" + "Connect to your home computer. This will work no matter what server you are currently connected to.",
ifconfig: "ipconfig<br>" + "Prints the IP address of the current server", ],
kill: hostname: ["hostname", " ", "Prints the hostname of the current server"],
"kill [script name] [args...]<br>" + ifconfig: ["ipconfig", " ", "Prints the IP address of the current server"],
"kill [pid]<br>" + kill: [
"Kill the script specified by the script name and arguments OR by its PID.<br><br>" + "kill [script name] [args...]",
"If you are killing the script using its filename and arguments, then each " + " ",
"argument must be separated by a space. Remember that a running script is " + "kill [pid]",
"uniquely identified by both its name and the arguments that are used to start " + " ",
"it. So, if a script was ran with the following arguments:<br><br>" + "Kill the script specified by the script name and arguments OR by its PID.",
"run foo.script 1 sigma-cosmetics<br><br>" + " ",
"Then to kill this script the same arguments would have to be used:<br><br>" + "If you are killing the script using its filename and arguments, then each ",
"kill foo.script 1 sigma-cosmetics<br><br>" + "argument must be separated by a space. Remember that a running script is ",
"uniquely identified by both its name and the arguments that are used to start ",
"it. So, if a script was ran with the following arguments:",
" ",
"run foo.script 1 sigma-cosmetics",
" ",
"Then to kill this script the same arguments would have to be used:",
" ",
"kill foo.script 1 sigma-cosmetics",
" ",
"If you are killing the script using its PID, then the PID argument must be numeric", "If you are killing the script using its PID, then the PID argument must be numeric",
killall: ],
"killall<br>" + killall: [
"Kills all scripts on the current server. " + "killall",
"Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. " + " ",
"This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. " + "Kills all scripts on the current server. ",
"Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. ",
"This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. ",
"The script will not be stopped/killed until after that time has elapsed.", "The script will not be stopped/killed until after that time has elapsed.",
ls: ],
"ls [dir] [| grep pattern]<br>" + ls: [
"The ls command, with no arguments, prints all files and directories on the current server's directory to the Terminal screen. " + "ls [dir] [| grep pattern]",
"The files will be displayed in alphabetical order. <br><br>" + " ",
"The 'dir' optional parameter can be used to display files/directories in another directory.<br><br>" + "The ls command, with no arguments, prints all files and directories on the current server's directory to the Terminal screen. ",
"The '| grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern.<br><br>" + "The files will be displayed in alphabetical order. ",
"Examples:<br><br>" + " ",
"List all files with the '.script' extension in the current directory:<br>" + "The 'dir' optional parameter can be used to display files/directories in another directory.",
"ls | grep .script<br><br>" + " ",
"List all files with the '.js' extension in the root directory:<br>" + "The '| grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern.",
"ls / | grep .js<br><br>" + " ",
"List all files with the word 'purchase' in the filename, in the 'scripts' directory:<br>" + "Examples:",
" ",
"List all files with the '.script' extension in the current directory:",
" ",
"ls | grep .script",
" ",
"List all files with the '.js' extension in the root directory:",
" ",
"ls / | grep .js",
" ",
"List all files with the word 'purchase' in the filename, in the 'scripts' directory:",
" ",
"ls scripts | grep purchase", "ls scripts | grep purchase",
lscpu: "lscpu<br>" + "Prints the number of CPU Cores the current server has", ],
mem: lscpu: ["lscpu", " ", "Prints the number of CPU Cores the current server has"],
"mem [script name] [-t] [num threads]<br>" +
"Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print " + mem: [
"the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then " + "mem [script name] [-t] [num threads]",
"an argument for the number of threads must be passed in afterwards. Examples:<br><br>" + " ",
"mem foo.script<br>" + "Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print ",
"mem foo.script -t 50<br>" + "the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then ",
"The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example " + "an argument for the number of threads must be passed in afterwards. Examples:",
" ",
"mem foo.script",
" ",
"mem foo.script -t 50",
" ",
"The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example ",
"above will print the amount of RAM needed to run 'foo.script' with 50 threads.", "above will print the amount of RAM needed to run 'foo.script' with 50 threads.",
mv: ],
"mv [src] [dest]<br>" + mv: [
"Move the source file to the specified destination. This can also be used to rename files. " + "mv [src] [dest]",
"This command only works for scripts and text files (.txt). This command CANNOT be used to " + " ",
"convert to different file types<br><br>" + "Move the source file to the specified destination. This can also be used to rename files. ",
"Note that, unlike the Linux 'mv' command, the destination argument must be the " + "This command only works for scripts and text files (.txt). This command CANNOT be used to ",
"full filepath. " + "convert to different file types",
"Examples: <br><br>" + " ",
"mv hacking-controller.script scripts/hacking-controller.script<br>" + "Note that, unlike the Linux 'mv' command, the destination argument must be the ",
"full filepath. ",
"Examples: ",
" ",
"mv hacking-controller.script scripts/hacking-controller.script",
" ",
"mv myScript.js myOldScript.js", "mv myScript.js myOldScript.js",
nano: ],
"nano [file name]<br>" + nano: [
"Opens up the specified file in the Text Editor. Only scripts (.script) or text files (.txt) can be " + "nano [file name]",
"edited using the Text Editor. If the file does not already exist, then a new, empty one " + " ",
"Opens up the specified file in the Text Editor. Only scripts (.script) or text files (.txt) can be ",
"edited using the Text Editor. If the file does not already exist, then a new, empty one ",
"will be created", "will be created",
ps: "ps<br>" + "Prints all scripts that are running on the current server", ],
rm: ps: ["ps", " ", "Prints all scripts that are running on the current server"],
"rm [file]<br>" +
"Removes the specified file from the current server. A file can be a script, a program, or a message file. <br><br>" + rm: [
"rm [file]",
" ",
"Removes the specified file from the current server. A file can be a script, a program, or a message file. ",
" ",
"WARNING: This is permanent and cannot be undone", "WARNING: This is permanent and cannot be undone",
run: ],
"run [file name] [-t] [num threads] [args...]<br>" + run: [
"Execute a program or a script.<br><br>" + "run [file name] [-t] [num threads] [args...]",
"The '[-t]', '[num threads]', and '[args...]' arguments are only valid when running a script. The '-t' flag is used " + " ",
"to indicate that the script should be run with the specified number of threads. If the flag is omitted, " + "Execute a program or a script.",
"then the script will be run with a single thread by default. " + " ",
"If the '-t' flag is used, then it MUST come immediately " + "The '[-t]', '[num threads]', and '[args...]' arguments are only valid when running a script. The '-t' flag is used ",
"after the script name, and the [num threads] argument MUST come immediately afterwards. <br><br>" + "to indicate that the script should be run with the specified number of threads. If the flag is omitted, ",
"[args...] represents a variable number of arguments that will be passed into the script. See the documentation " + "then the script will be run with a single thread by default. ",
"about script arguments. Each specified argument must be separated by a space. <br><br>", "If the '-t' flag is used, then it MUST come immediately ",
scan: "after the script name, and the [num threads] argument MUST come immediately afterwards. ",
"scan<br>" + " ",
"Prints all immediately-available network connection. This will print a list of all servers that you can currently connect " + "[args...] represents a variable number of arguments that will be passed into the script. See the documentation ",
"about script arguments. Each specified argument must be separated by a space. ",
" ",
],
scan: [
"scan",
" ",
"Prints all immediately-available network connection. This will print a list of all servers that you can currently connect ",
"to using the 'connect' Terminal command.", "to using the 'connect' Terminal command.",
"scan-analyze": ],
"scan-analyze [depth] [-a]<br>" + "scan-analyze": [
"Prints detailed information about all servers up to [depth] nodes away on the network. Calling " + "scan-analyze [depth] [-a]",
"'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal " + " ",
"command. This command also shows the relative paths to reach each server.<br><br>" + "Prints detailed information about all servers up to [depth] nodes away on the network. Calling ",
"By default, the maximum depth that can be specified for 'scan-analyze' is 3. However, once you have " + "'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal ",
"the DeepscanV1.exe and DeepscanV2.exe programs, you can execute 'scan-analyze' with a depth up to " + "command. This command also shows the relative paths to reach each server.",
"5 and 10, respectively.<br><br>" + " ",
"The information 'scan-analyze' displays about each server includes whether or not you have root access to it, " + "By default, the maximum depth that can be specified for 'scan-analyze' is 3. However, once you have ",
"its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM " + "the DeepscanV1.exe and DeepscanV2.exe programs, you can execute 'scan-analyze' with a depth up to ",
"it has.<br><br>" + "5 and 10, respectively.",
"By default, this command will not display servers that you have purchased. However, you can pass in the " + " ",
"The information 'scan-analyze' displays about each server includes whether or not you have root access to it, ",
"its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM ",
"it has.",
" ",
"By default, this command will not display servers that you have purchased. However, you can pass in the ",
"-a flag at the end of the command if you would like to enable that.", "-a flag at the end of the command if you would like to enable that.",
scp: ],
"scp [filename] [target server]<br>" + scp: [
"Copies the specified file from the current server to the target server. " + "scp [filename] [target server]",
"This command only works for script files (.script extension), literature files (.lit extension), " + " ",
"and text files (.txt extension). " + "Copies the specified file from the current server to the target server. ",
"This command only works for script files (.script extension), literature files (.lit extension), ",
"and text files (.txt extension). ",
"The second argument passed in must be the hostname or IP of the target server.", "The second argument passed in must be the hostname or IP of the target server.",
sudov: "sudov<br>" + "Prints whether or not you have root access to the current machine", ],
tail: sudov: ["sudov", " ", "Prints whether or not you have root access to the current machine"],
"tail [script name] [args...]<br>" +
"Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated " + tail: [
"by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used " + "tail [script name] [args...]",
"to run it. So, if a script was ran with the following arguments: <br><br>" + " ",
"run foo.script 10 50000<br><br>" + "Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated ",
"Then in order to check its logs with 'tail' the same arguments must be used: <br><br>" + "by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used ",
"to run it. So, if a script was ran with the following arguments: ",
" ",
"run foo.script 10 50000",
" ",
"Then in order to check its logs with 'tail' the same arguments must be used: ",
" ",
"tail foo.script 10 50000", "tail foo.script 10 50000",
theme: ],
"theme [preset] | [#background #text #highlight]<br>" + theme: [
"Change the color of the game's user interface<br><br>" + "theme [preset] | [#background #text #highlight]",
"This command can be called with a preset theme. Currently, the supported presets are 'default', 'muted', and 'solarized'. " + " ",
"However, you can also specify your own color scheme using hex values. To do so, you must specify three hex color values " + "Change the color of the game's user interface",
"for the background color, the text color, and the highlight color. These hex values must be preceded by a pound sign (#) and " + " ",
"must be either 3 or 6 digits. Example:<br><br>" + "This command can be called with a preset theme. Currently, the supported presets are 'default', 'muted', and 'solarized'. ",
"theme #ffffff #385 #235012<br><br>" + "However, you can also specify your own color scheme using hex values. To do so, you must specify three hex color values ",
"A color picker such as " + "for the background color, the text color, and the highlight color. These hex values must be preceded by a pound sign (#) and ",
"<a href='https://www.google.com/search?q=color+picker&oq=color+picker&aqs=chrome.0.0l6.951j0j1&sourceid=chrome&ie=UTF-8' target='_blank'>Google's</a> " + "must be either 3 or 6 digits. Example:",
"can be used to get your desired hex color values<br><br>" + " ",
"theme #ffffff #385 #235012",
" ",
"A color picker such as ",
"<a href='https://www.google.com/search?q=color+picker&oq=color+picker&aqs=chrome.0.0l6.951j0j1&sourceid=chrome&ie=UTF-8' target='_blank'>Google's</a> ",
"can be used to get your desired hex color values",
" ",
"Themes are not saved, so when the game is closed and then re-opened or reloaded then it will revert back to the default theme.", "Themes are not saved, so when the game is closed and then re-opened or reloaded then it will revert back to the default theme.",
top: ],
"top<br>" + top: [
"Prints a list of all scripts running on the current server as well as their thread count and how much " + "top",
" ",
"Prints a list of all scripts running on the current server as well as their thread count and how much ",
"RAM they are using in total.", "RAM they are using in total.",
unalias: ],
"unalias [alias name]<br>" + unalias: [
"Deletes the specified alias. Note that the double quotation marks are required. <br><br>" + "unalias [alias name]",
"As an example, if an alias was declared using:<br><br>" + " ",
'alias r="run"<br><br>' + "Deletes the specified alias. Note that the double quotation marks are required. ",
"Then it could be removed using:<br><br>" + " ",
"unalias r<br><br>" + "As an example, if an alias was declared using:",
" ",
'alias r="run"',
" ",
"Then it could be removed using:",
" ",
"unalias r",
" ",
"It is not necessary to differentiate between global and non-global aliases when using 'unalias'", "It is not necessary to differentiate between global and non-global aliases when using 'unalias'",
wget: ],
"wget [url] [target file]<br>" + wget: [
"Retrieves data from a URL and downloads it to a file on the current server. The data can only " + "wget [url] [target file]",
"be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists, " + " ",
"it will be overwritten by this command.<br><br>" + "Retrieves data from a URL and downloads it to a file on the current server. The data can only ",
"Note that it will not be possible to download data from many websites because they do not allow " + "be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists, ",
"cross-origin resource sharing (CORS). Example:<br><br>" + "it will be overwritten by this command.",
" ",
"Note that it will not be possible to download data from many websites because they do not allow ",
"cross-origin resource sharing (CORS). Example:",
" ",
"wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt", "wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt",
],
}; };

@ -527,7 +527,7 @@ export class Terminal implements ITerminal {
switch (ITutorial.currStep) { switch (ITutorial.currStep) {
case iTutorialSteps.TerminalHelp: case iTutorialSteps.TerminalHelp:
if (commandArray.length === 1 && commandArray[0] == "help") { if (commandArray.length === 1 && commandArray[0] == "help") {
this.print(TerminalHelpText); TerminalHelpText.forEach((line) => this.print(line));
iTutorialNextStep(); iTutorialNextStep();
} else { } else {
this.print("Bad command. Please follow the tutorial"); this.print("Bad command. Please follow the tutorial");

@ -16,7 +16,7 @@ export function help(
return; return;
} }
if (args.length === 0) { if (args.length === 0) {
terminal.print(TerminalHelpText); TerminalHelpText.forEach((line) => terminal.print(line));
} else { } else {
const cmd = args[0]; const cmd = args[0];
const txt = HelpTexts[cmd]; const txt = HelpTexts[cmd];
@ -24,6 +24,6 @@ export function help(
terminal.error("No help topics match '" + cmd + "'"); terminal.error("No help topics match '" + cmd + "'");
return; return;
} }
terminal.print(txt); txt.forEach((t) => terminal.print(t));
} }
} }