{"id":19934432,"url":"https://github.com/miltontom/usb-drive-buster","last_synced_at":"2025-09-11T17:36:55.290Z","repository":{"id":223400733,"uuid":"760223104","full_name":"miltontom/usb-drive-buster","owner":"miltontom","description":"Anti-cheating system for practical examinations in computer science.","archived":false,"fork":false,"pushed_at":"2024-06-11T13:47:02.000Z","size":292,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T02:06:33.476Z","etag":null,"topics":["anti-cheating","flash-drive","powershell","telegram","usb-flash-drive","usb-monitor"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miltontom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-02-20T02:30:01.000Z","updated_at":"2024-06-11T13:47:05.000Z","dependencies_parsed_at":"2024-02-20T03:40:01.586Z","dependency_job_id":"35101220-d7d6-457b-8b73-01ddd9cbb413","html_url":"https://github.com/miltontom/usb-drive-buster","commit_stats":null,"previous_names":["miltontom/usb-drive-buster"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miltontom%2Fusb-drive-buster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miltontom%2Fusb-drive-buster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miltontom%2Fusb-drive-buster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miltontom%2Fusb-drive-buster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miltontom","download_url":"https://codeload.github.com/miltontom/usb-drive-buster/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241361395,"owners_count":19950379,"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":["anti-cheating","flash-drive","powershell","telegram","usb-flash-drive","usb-monitor"],"created_at":"2024-11-12T23:16:48.899Z","updated_at":"2025-03-01T11:45:30.115Z","avatar_url":"https://github.com/miltontom.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# USB Drive Buster\n\nBust anyone who connects a USB drive to cheat in practical examinations.\n\n## Why I created this?\n\nAs practical examinations in Computer Science involve writing code, students tend to bring in USB drives with source code stored in it and they would connect to the system and copy paste the code without the invigilators knowing about it. This way of cheating was something that I observed in my college, so I decided to put an end to it. My system brings a solution to this problem as if one connects a USB drive, the system sends a message via Telegram to the invigilator about the details of the drive and other log info like date and time etc in a readable way.\n\n## Working\n\nThe script runs as a service in the background and monitors for USB flash drives connected to the computer and logs the details to a file *usbdrivebuster.log* which contains info about when the device was connected/disconnected, vendor \u0026 product name, serial id and the drive size. It also a sends a message via telegram so that the invigilators can know about it. \n\n## Prerequisites\n* PowerShell 6.1.0 (or higher)\n* [PoshGram](https://www.powershellgallery.com/packages/PoshGram/2.0.0) module installed\n* Telegram requirements\n    * Telegram account\n    * Group chat created with [bot](https://core.telegram.org/bots#how-do-i-create-a-bot) as a member\n    * Group chat ID (refer this [video](https://youtu.be/UPC5Ck1oU6k?feature=shared\u0026t=17))\n\n## Setup\n### Set bot token and chat ID\nIn the `main.ps1` script file paste the bot token and chat ID\n```\n$telegramBotToken = \"nnnnnnnnn:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n$telegramGroupChatId = \"-nnnnnnnnn\"\n```\n\n### Create a service (Windows)\n\n1. Install [`nssm`](https://scoop.sh/#/apps?q=nssm\u0026id=9bb530a6593cf96fd08e6f78dd9724f5810faeb8) from the scoop package manager\n2. Create a service\n\n    ```powershell\n    nssm install \u003cservice name\u003e \"C:\\path\\to\\pwsh.exe\" \"-ExecutionPolicy Bypass -File C:\\path\\to\\main.ps1\"\n    ```\n    **NOTE**: *The absolute path to the* `pwsh.exe` *and* `main.ps1` *should be specified*.\n3. Configure the service\n\n    ```powershell\n    nssm edit \u003cservice name\u003e\n    ```\n\n    Specify the username and password for the user account: `Log on \u003e This account`, click `Edit service` to save changes.\n\n    ![nssm service editor](previews/nssm.png)\n\n## Usage\nBy default the service won't start automatically at startup. This can be changed by editing `Details \u003e Startup type`\n\n![service edit](previews/startup-type.png)  \n\n### Service Operations\nYou can manage the service via the Task Manager: `Task Manager \u003e Services`, here you can right-click and select the operation you want. This can also be done from the command-line with the commands mentioned below for **Command Prompt** and **PowerShell**.\n\n**NOTE**: *The following operations should be run with administrator privileges*.  \n\n1. Start the service\n\n    ```powershell\n    # cmd\n    net start USBDriveBusterService\n\n    # powershell\n    Start-Service -Name USBDriveBusterService\n    ```\n2. Stop the service\n\n    ```powershell\n    # cmd\n    net stop USBDriveBusterService\n\n    # powershell\n    Stop-Service -Name USBDriveBusterService\n    ```\n3. Restart the service\n\n    ```powershell\n    # cmd\n    net restart USBDriveBusterService\n\n    # powershell\n    Restart-Service -Name USBDriveBusterService\n    ```\n4. Remove the service\n\n    ```powershell\n    nssm remove USBDriveBusterService\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiltontom%2Fusb-drive-buster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiltontom%2Fusb-drive-buster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiltontom%2Fusb-drive-buster/lists"}