Added commands for port breaking programs in Netscript

This commit is contained in:
Daniel Xie
2017-05-10 23:20:17 -05:00
parent 8cf17cf229
commit 3ac33cd9e7
6 changed files with 346 additions and 71 deletions
+9
View File
@@ -713,6 +713,15 @@ GetServerByHostname = function(hostname) {
return null;
}
//Get server by IP or hostname. Returns null if invalid
getServer = function(s) {
if (!isValidIPAddress(s)) {
return GetServerByHostname(s);
} else {
return AllServers[s];
}
}
//Debugging tool
PrintAllServers = function() {
for (var ip in AllServers) {