Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- These files are used to control door access in a base. Specific file functions are described below
- The clientTest file is used as a door controller. It is intended to be placed inside a wall, with the back connected to a piston. The left and right sides should have disk drives, and the front should be connected to a network drive. The left and right sides of the network drive, then, should be connected to monitors. Finally, the top requires a wireless modem. If the server is more than 256 blocks away this must be an ender modem. The server id is a variable at the top of this file and must be edited to match the computer id of the server computer.
- -To do: Go through and comment everything
- -To do: Fix monitor wrapping and reenable printToMonitor instead of print
- -To do: add error handling. Currently not a problem, but should be done for propriety's sake
- -To do: reenable cryptography. Low importance
- The serverTest file contains all the appropriate code to actually verify door access. The computer running this program should be placed in a secure location and requires a wireless modem (preferably an ender modem) to be mounted to the top. The client computer will send a message to the server containing the user_id and user_pass stored on the disk inserted into the client computer drive. The server then checks these against files stored locally, ensuring that the user_id is a recognized user and that the password stored for that user matches the transmitted user_pass. If they do, then the server checks the locally stored user_access_level against the locally stored access level of the door. If it is greater than the stored user_access_level, then the door opens. If it isn't, the door remains closed and the client computer informs the user of the rejection.
- -To do: Go through and comment everything
- -To do: add error handling. Currently not a problem, but should be done for propriety's sake
- -To do: reenable cryptography. Low importance
- The adminTest file is used for an admin console. The admin console is a computer with disk drives on the left and right sides and a wireless modem on the top. If more than 256 blocks away from the server, this must be an ender modem. The admin console is used to add new users to the network. By inserting an admin disk (access level is 3 or higher) into the right drive and a blank disk into the left drive, the admin console will verify the admin disk and prompt the user to add the new user to the system.
- -To do: Go through and comment everything
- -To do: add error handling. Currently not a problem, but should be done for propriety's sake
- -To do: reenable cryptography. Low importance
- the user_id.txt and user_pass.txt files should be placed on a floppy disk. This will create an initial admin disk for use in the system.
- the progress.txt, progress_level.txt and door_0_level.txt files should be placed on the server. door_0_level.txt MUST be renamed such that the "0" matches the computer number of the door client computer. Each time a new door client computer is added, a file must be added with that same format. The contents of the file should be a number between 0 and 3. 0 is for guest level access, 1 is for employee level access, 2 is for admin level access and 3 is for master level access. Technically, higher levels are possible, the code doesn't preclude it, but higher levels are not defined. You will also need to add a door_X_level.txt file for the admin console!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement