aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Fincham <michael@hotplate.co.nz>2018-11-09 19:36:59 +1300
committerGitHub <noreply@github.com>2018-11-09 19:36:59 +1300
commit083acb679e3a8cd4d0196ecbaa4334f7d878a6fa (patch)
treeb14290afd314ad6fbce468f7d086335b40b1d57a
parent685a5edf9b7b864981b1b8e3c0bf8afff4b8e704 (diff)
parent1f73429bad42c05c5200591d4467036f9357bd01 (diff)
downloadkiwicon2038-083acb679e3a8cd4d0196ecbaa4334f7d878a6fa.tar.gz
kiwicon2038-083acb679e3a8cd4d0196ecbaa4334f7d878a6fa.tar.bz2
kiwicon2038-083acb679e3a8cd4d0196ecbaa4334f7d878a6fa.zip
Merge pull request #4 from alzeih/file-as-array
move files to array
-rw-r--r--src/ai.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ai.c b/src/ai.c
index 619820a..2946326 100644
--- a/src/ai.c
+++ b/src/ai.c
@@ -102,6 +102,13 @@ uint8_t *process[] = {
"wopr.out"
};
+uint8_t *files[] = {
+ "core",
+ "passwords",
+ "README.NOW",
+ "secaudit"
+};
+
#include "random.c"
#include "intel.c"
#include "terminal.c"
@@ -253,7 +260,11 @@ void game(void) {
} else if (match(key_buffer, "pwd")) {
print("\r\n/usr/pak0/technician\r\n");\
} else if (match(key_buffer, "ls") || match(key_buffer, "dir")) {
- print("\r\ncore passwords README.NOW secaudit\r\n");
+ print("\r\n");
+ for (int i = 0; i < sizeof(files)/sizeof(files[0]); i++ ) {
+ print(files[i]);
+ print("\r\n");
+ }
} else if (starts(key_buffer, "type ") || starts(key_buffer, "cat ")) {
if (match(key_buffer, "type passwords") || match(key_buffer, "cat passwords")) {
print("\r\n*** SECAUDIT EXCEPTION: Rogue access to passwordfile. Session terminated.\r\n");