{"id":21909379,"url":"https://github.com/pbergstrom90/keycardsimulator","last_synced_at":"2025-03-22T07:49:46.540Z","repository":{"id":229858445,"uuid":"715615988","full_name":"PBergstrom90/KeycardSimulator","owner":"PBergstrom90","description":"Examproject to simulate a Keycardreader in C, November 2023.","archived":false,"fork":false,"pushed_at":"2024-10-28T15:10:59.000Z","size":2345,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-27T08:12:13.629Z","etag":null,"topics":["c","exam","keycard","scanner","simulation"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PBergstrom90.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-07T13:55:27.000Z","updated_at":"2024-10-28T15:11:03.000Z","dependencies_parsed_at":"2024-03-26T16:55:19.840Z","dependency_job_id":"92e191a5-cdb0-4283-8fbc-0fcbb9e96e8f","html_url":"https://github.com/PBergstrom90/KeycardSimulator","commit_stats":null,"previous_names":["pbergstrom90/keycard_exam","pbergstrom90/keycardsimulator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PBergstrom90%2FKeycardSimulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PBergstrom90%2FKeycardSimulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PBergstrom90%2FKeycardSimulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PBergstrom90%2FKeycardSimulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PBergstrom90","download_url":"https://codeload.github.com/PBergstrom90/KeycardSimulator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244924768,"owners_count":20532874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","exam","keycard","scanner","simulation"],"created_at":"2024-11-28T17:17:15.291Z","updated_at":"2025-03-22T07:49:46.511Z","avatar_url":"https://github.com/PBergstrom90.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Keycard System\n\n## Overview\n\nThis program simulates a basic keycard system where users can manage a list of keycards, grant or revoke access, and save/load keycard data to/from a text file.\n\n## Features\n\n- **Add New Keycards:**\n  Users can add new keycards to the system, specifying unique card IDs and access permissions.\n\n- **Revoke Access:**\n  The program allows users to revoke access for specific keycards. This feature is crucial for maintaining security and controlling entry permissions.\n\n- **View Keycard List:**\n  Users can view the list of keycards in the system. This provides an overview of all registered keycards and their current access status.\n\n- **Save and Load Keycard Data:**\n  The system supports saving keycard data to a file (`cardlist.txt`) and loading data from the same file. This ensures persistent storage of keycard information between program sessions.\n\n- **Simulate Remote Door Operations:**\n  The program includes a simulation of remote door operations. Users can initiate door actions such as opening or locking, providing a visual representation through simulated green and red lights.\n\n- **Scan Keycards:**\n  Users can scan a keycard, check its access permissions, and simulate corresponding door actions based on the card's status (access granted or denied).\n\n## Getting Started\n\n1. **Compilation:**\n   - Make sure you have a C compiler installed.\n   - Compile the program using your preferred compiler. Example: `gcc main.c -o keycard_system`\n\n2. **Run the Program:**\n   - Execute the compiled program: `./keycard_system`\n\n3. **Usage:**\n   - Follow the on-screen instructions to navigate through the keycard system.\n   - Use the admin menu to manage keycards.\n\n## File Structure\n\n- `main.c`: Main program file.\n- `adminmenu.c`: Admin menu functions.\n- `card.h`: Keycard-related struct.\n- `cardlist.h`: Struct for managing the list of keycards.\n- `fileio.c`: File I/O functions for saving and loading keycard data.\n- `listcard.c`: Functions for listing and printing card information.\n- `cardaccess.c`: Functions responsible for handling card access and modifying access permissions.\n- `remotedoor.c`: File simulating remote door operations, with a red-green light simulation.\n- `scancard.c`: Functions responsible for scanning a card, checking access permissions, and simulating door actions.\n- `safeinput.c`: Functions for handling user inputs throughout the program.\n\n## Sample Keycards (Default)\n\n- Card ID: 1212, Access Granted: Yes\n- Card ID: 1213, Access Granted: No\n\n## File Descriptions\n\n- `cardlist.txt`: Text file to save/load keycard data. Is created upon program start, if it has not yet been created.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbergstrom90%2Fkeycardsimulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpbergstrom90%2Fkeycardsimulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbergstrom90%2Fkeycardsimulator/lists"}