OpenCyber Academy
Rapid course · Lesson 5 · English
Course code: OCA-011Lesson 05: OCA-011-A005

The lease print is not the router checklist

Open, free learning for anyone who wants to protect people and technology. No account is required to read this text or its worked answers.

Lesson map

Lesson 05. Map, example, EX051.

flowchart TD
  A["lab_leases.py compares two sets"] --> B["Seven rows, two UNKNOWN"]
  C["lab_router.py evaluates seven flags"] --> D["Print: 2 of 7 pass"]
  B --> E{"May one print answer the other question?"}
  D --> E
  E -->|No| F["Quote the script that measured it"]

The lease run is a set comparison. The router run is a list of flags.

Logical drawing

lease print
    seven rows
    unknown: ['bb:77', 'cc:19']
    known but not seen: []
router print
    PASS  Wi-Fi uses WPA2 or WPA3
    PASS  guest network enabled
    five FIX lines
    2 of 7 pass

Learning outcomes

After this chapter, you should be able to:

  1. Name the question each script answers.
  2. Keep both prints.
  3. Refuse a note that treats one score as the other measurement.

5.1 Two instruments, taken on two different objects.

A measurement is only as good as the question it was built to answer. lab_leases.py holds a dictionary of five known hardware labels and a list of seven leases. It prints each lease, looks the label up, and then prints the set difference in both directions. The embedded run therefore ends with unknown: ['bb:77', 'cc:19'] and known but not seen: []. That is an inventory comparison. It does not read a password flag, a firmware age, or an isolation boolean.

lab_router.py holds a different object: a dictionary of settings. It evaluates seven predicates and prints PASS or FIX for each, then 2 of 7 pass. The two passing predicates are the Wi-Fi mode check and the guest-network check. The script never opens the lease list. A classmate who writes the unknown-device count into the router score, or who deletes the five FIX lines because the lease comparison "looked tidy," is reporting a quantity the second script did not compute.

Chapter 3 also separates practice from operations. The lease block is labelled synthetic, and the prose says Leo practises the comparison before a live export. The live export's rows are not in this file. The router block is likewise a synthetic settings dictionary. Chapter 4 later tells a story in which the checklist is considered again after changes. That story is not a second copy of lab_router.py. Leave both embedded runs as the only machine output the book contains.

5.2 Worked example

Match the sentence to the instrument that can support it.

Lesson table; scroll horizontally to read all columns →

Cited line Instrument Decision
unknown: ['bb:77', 'cc:19'] Lease comparison Keep it on that print
known but not seen: [] Lease comparison Keep the empty side
2 of 7 pass Router flags Keep it on that print
"So the leases now pass 2 of 7." Neither script Refuse

Synthetic case. Both prints belong to the Bramble Street exercise. Neither is a re-run of the other.

Errors and limits

A tidy inventory can sit beside a weak configuration. The two files are not drafts of one score.

Apply

Worked answers

EX051. No. Both prints stay. The lease lines stay seven rows, with unknown bb:77 and cc:19 and an empty known-but-not-seen side. The router print stays 2 of 7, and the two passes stay the Wi-Fi mode and the guest network. Do not edit either script.