26herbs

Hack-o-rama

Hack-o-rama is a system designed to allow simulated Hacker skills in LARP games. The system consists of a total of 7 files:
  1. documentation.shtml - The file you are currently reading.
  2. index.shtml - The file that displays the hacking interface
  3. hackostyle.css - The style sheet file for index.shtml
  4. filesystem.js - The java script file that runs the hacking system
  5. filesystem.xml - The data file for the layout of directories and files
  6. hackers.xml - The file that stores the Hacker passwords and their levels
  7. hackoramasetuptests.shtml - A file that performs tests on the filesystem.xml and hackers.xml files to ensure that they will be read correctly by the filesystem.js file
These files should all be stored in the same folder, to ensure that they can load each other as required.

index.shtml

When you open index.shtml, you will be presented with a teminal screen, showing a flashing cursor. Below the input box, is a list of Known bugs, this can be removed if desired.
There is some text displayed in a permanent header, this can be altered by editing the div section with id 'top' in index.shtml. This head allows 3 lines of text to be entered. It is advised that all text entry be limited to a maximum of 45 characters per line.
You can type commands in at the prompt '->'. The maximum length of command allowed is 25 characters, bear this in mind when setting up the filesystem and hacker data.
There are several commands that can be entered to the system:
  1. clear - this clears the screen of all previously entered text.
  2. echo <text> - this will echo back the entered text.
  3. dir - this will produce a directory listing of the current directory.
  4. dir up - this will move you up a directory.
  5. dir <dir name> <password> - This will navigate to the specified directory, if it is an immediate child of the current directory. Some directories require a password, and this should be entered after the name.
  6. list <file name> <password> - This will display the contents of the named file, again some require passwords.
If an unrecognised command is entered 'Bad Command' will be displayed. The system also informs you if it cannot find a named file or directory, or if the password given is incorrect.
Most special characters are not allowed in commands, if they are entered, they will be stripped out by the interpreter (alphanumeric, space and underscore are all safe).
Extra words added to the end of commands will be ignored ('dir <dir name> <password> <random word>' is the same as 'dir <dir name> <password>').

Hacking

Every character capable of using a Hacking skill should be given a Hacker password. This can be entered in the place of any password in the system, and it will grant a clue as to the correct password for that file or directory. This password usage is time limited, and will not provide a clue if it is used too quickly after the previous use (currently, there are 5 hacker levels, and the time between usage is (6 - Hacker Level) * 10 seconds).

Setting up the hacker list

hackers.xml contains the list of hacker passwords and the hacker level. The hackers.xml file will look something like this: <hackers> <hacker pass="w1nn3r" level="3" /> <hacker pass="lu53r" level="1" /> </hackers> <hackers> is the parent node for the file, and is required. Each individual hacker will need a <hacker> element. pass gives the hacker password, and level the hacker level. Again, special characters are not allowed in hacker passwords, as they are stripped out on entry by the interpreter.

Setting up the filesytem

Below I have provided a sample filesystem.xml, for a very small set of files and directories. <filesystem> <directory name="dir1" pass="pass"> <directory name="dir2" pass=""> <file name="file1" pass="" contents="this is a[br][b][i]test file[/i][/b]" /> <file name="file2" pass="1234" contents="this is file 2"> <clue>This is a clue</clue> <clue>So is this</clue> </file> </directory> <file name="file3" pass="4321" contents="hello I am the the third file" /> </directory> <directory name="dir3" pass="needapass"> <file name="file4" pass="11" contents="I am the final file." /> <clue>clue for dir3</clue> </directory> </filesystem> <filesystem> is the parent node. It can have <directory> or <file> elements as children.
<directory> elements can have further <directory> or <file> elements as children, and can also have clues associated with it. <file> can only have <clue> child nodes.
Looking at the example above, we see that each directory needs a name and a password. The names must be unique throughout the file system, but passwords can be repeated. Neither names nor passwords should contain special characters, and they should not have spaces in either. A blank password means that a password is not required to open that file or directory.
In addition to name and pass, <file> elements require contents. This is a mostly free text field, any characters apart from < and > are allowed. There are three types of tag allowed to format the file contents.
  1. [br] - Starts a new line. You are advised to limit lines to 45 characters (not including tags), and limit files to 10 lines.
  2. [i] and [/i] - Makes the enclosed text italic when displayed.
  3. [b] and [/b] - Makes the enclosed text bold when displayed.
elements are the children of either directories or files. The text each <clue> tag contains can be returned as a clue for part of a hack attempt.
When directories are navigated to, they are displayed before the command prompt, delimited by a slash (e.g. 'dir1\dir2\ ->') Hence, due to the 45 character limit, it is currently advised that nested directories do not allow an overly long name to be displayed (25 characters are required for the input, 4 for the prompt, and one per directory for the slash, leaving about 20 characters for directory naming).

Hacker Clues

As mentioned above, when a hacking attempt is made on a file or directory, a clue is returned. This will either be one of the <clue> elements associated with the file, the length of the password, some of the first few characters, some of the last few characters, or the entire password.

hackoramasetuptests.shtml

This file will run a number of tests on the filesystem.xml and hackers.xml files. If the files pass all of these tests, they are more likely to be understood correctly by the system. Of course, this is not 100% certain, as there is always the chance of a bug that was missed. Furthermore, they seek to ensure that the xml files can be understood by the system, that does not mean that the output will be the one you desire.