This is a tool for cheating on exams that use a virtual camera. It hides a window behind the camera.
Supports image viewing and chatting through Discord.
It's meant for Windows, and it probably doesn't work (fully) on any other OS.
git clone [email protected]:Delemangi/prepis.git
cd prepis
npm install
npm run start
The terminal will remain on and frozen while running, so it's best to hide it on a different desktop (Windows Key + Tab
).
-
Create a
config.json
file in the project directory. It should have the following structure:{ "token": "your_bot_token", "channels": [ "discord_channel_id", "other_discord_channel_id" ], "modes": [ "theory", "practical", "exercises" ], "x": 180, "y": 550, "width": 620, "height": 450 }
The
x
andy
properties are the x and y offsets, respectively. The default values given here fit a one monitor 1080p setup. -
Create an
assets
folder in the project directory, and create folders with any name for the image sets. Put all images in the corresponding folders. The folder names should be specified in themodes
property inconfig.json
. -
For the PDF viewer, put a PDF file called
test.pdf
in theassets
directory.
The chat feature requires a Discord bot. Create one here and put its token in the token
property in config.json
.
Invite the bot to a server and choose a text channel in which the bot listens for messages by coping its ID and adding it in the channels
property in config.json
.
- Put all images in the
image-processor/input
folder python image_processor.py
- Retrieve all images from
image-processor/output
This may take a while to complete depending on the amount of images. It's supposed to make them less visible against a light background.
Unfortunately there is no straightforward way to find the magic numbers, so you'll just have to try a few times until you're happy. The default configuration given above should be good for most cases.
For single 1080p monitor setups, the x
setting should be 180.
For dual 1080p monitor setups, the x
settings should be 360.
- Move to left image:
a
,left arrow
- Move to right image:
d
,right arrow
- Increase opacity (main window only):
w
,up arrow
- Decrease opacity (main window only):
s
,down arrow
- Increase opacity (PDF window only):
alt + w
- Decrease opacity (PDF window only):
alt + s
- Toggle visibility (main window only):
escape
- Toggle visibility (PDF window only):
shift + escape
- Switch tabs:
m
- Send message:
enter
- Toggle chat image visibility:
b
Additionally, clicking any number will go to that image, i.e. clicking 1 will go to the first image. Holding ctrl
while clicking a number will change to the respective mode instead.
The shortcuts for toggling visiblity work even when the windows are not focused. All other shortcuts require focus.
When starting the app, by default the main window is revealed and the PDF window is hidden.
In case something goes wrong, the %APPDATA%/prepis
folder should be deleted.