Penek's Shenanigans

COKEZERO

This project serves as a mock exam service for those enrolled in the 2301371 Operating Systems course at my current university (me and my friends basically). It shuffles 5 out of 7 topics and selects 1 question out of each selected topic, amounting to 5 questions total. Users will have 10 minutes to complete the 5 questions displayed on screen in an ephemeral Linux Docker environment. Failure to meet the deadline will have the connection terminated. Users will have the chance to rematch when they finish.

Implementation

When a user logs in as spy over SSH, the SSH Daemon (sshd) forces the execution of a script that starts a fresh Docker Container and runs the quiz script inside the container. The quiz script then sets traps to ignore signals like INT, TSTP and QUIT, preventing the user from interrupting, suspending or quitting the quiz prematurely. This is why users cannot send SIGINT to processes and must pause them first before terminating.

Preinstalled Packages

The following snippet is from the initialization script which outlines the preinstalled packages. Users can further install any necessary packages to aid them in completing the questions.

FROM ubuntu:24.04

RUN apt-get update && apt-get install -y \
  bash coreutils util-linux lsb-release \
  procps iputils-ping net-tools iproute2 \
  curl wget ftp dnsutils openssl openssh-client \
  tar gzip zip unzip bzip2 xz-utils gnupg ncal \
  passwd sudo at build-essential man-db wamerican \
  jq less vim nano sed grep gawk xxd findutils \

Server Reinstallation

On Sunday, August 10th 2025, I did an OS reinstallation on the server hosting this service. If you have authenticated before the action, you may encounter an error while trying to reauthenticate. Please refer to this article for guidance.