Sign inSign up free

1449. Verify Files Against a Checksum Manifest

easy 10 XP ~10 minHands-on lab

Release bundles ship with a manifest in sha256sum format: one line per file, HASH RELATIVE/PATH (two spaces), paths relative to the manifest's folder. The verifier must run on machines without coreutils' sha256sum. Write /home/student/release/verify.py MANIFEST.

Task

  • For each line, in manifest order, print OK PATH, CHANGED PATH (the file exists but its SHA-256 differs) or MISSING PATH.
  • Paths are relative to the folder the manifest is in, not to where you run the script. They may contain spaces.
  • Exit 0 if every file is OK, 1 otherwise.

About this machine

Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.

Part of Python for DevOps. Next step: Find Expiring Certificates in an Inventory Database

Teaching or writing about this? Embed this lab on your page

TerminalNot started

Your machine is ready to start

A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.

No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.