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

The scope print follows the request list

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
  R["requested, four strings, written order"] --> L["One pass, no sorted call"]
  L --> P["Four verdict lines in that same order"]
  P --> Q{"Did a score pick the first line?"}
  Q -->|No| K["Keep the embedded print"]

The scope script walks requested. It does not rank addresses.

Logical drawing

192.0.2.5      in scope
192.0.2.10     EXCLUDED - do not test
192.0.2.130    OUT OF SCOPE - do not test
198.51.100.7   OUT OF SCOPE - do not test

Learning outcomes

After this chapter, you should be able to:

  1. Name the four strings in requested, in the order they are stored.
  2. Say why .10 prints second even though its verdict is a refusal.
  3. Refuse a print that leads with the payroll address because it feels more important.

5.1 The loop emits requested. It does not call sorted.

lab_scope.py stores four strings. The first is 192.0.2.5. The second is 192.0.2.10. The third is 192.0.2.130. The fourth is 198.51.100.7. The for loop takes them in that stored sequence. Each pass builds one line and prints it before the next pass starts. Nothing in the file sorts those strings, and nothing reorders them after the verdict is chosen.

A refusal is still a line. The payroll address is second in the list, so its refusal is the second line. Putting the two OUT OF SCOPE lines first would be a different list. This file does not build that list.

Lesson table; scroll horizontally to read all columns →

What chooses the row order What does not
Position in requested The verdict word
One forward pass sorted
Print during the pass A severity score

5.2 Worked example

Lesson table; scroll horizontally to read all columns →

Offered result What produced it Decision
.5, then .10, then .130, then 198.51.100.7 The list, top to bottom Keep
Payroll line second, and still a refusal Position, not importance Keep
"The script printed safe rows first." No such reorder exists Refuse
"Drop the refused lines so the page looks cleaner." Those lines are the record Refuse

Synthetic case. These four lines are the only scope-lab output.

Errors and limits

Do not rebuild requested so a preferred verdict prints first.

Apply

  • EX051 — List order. The print names .5, then the payroll address, then .130, then 198.51.100.7. May a preference for "in scope" rows, or a later note, replace that order?
    Show marking criteria
    Rubric: 3 = no; the lines follow requested; a refusal still occupies its slot; do not sort the script;; 2 = the four lines stay and the note stays prose;; 1 = one line;; 0 = none.
Worked answers

EX051. No. The four lines follow requested. The payroll refusal stays in the second slot. A later note does not sort the script.